| Visual Basic (Declaration) | |
|---|---|
Public Overloads Sub Add( _ ByVal rule As ListDataValidationRule, _ ByVal region As WorksheetRegion _ ) | |
| C# | |
|---|---|
public void Add( ListDataValidationRule rule, WorksheetRegion region ) | |
Parameters
- rule
- The data validation rule to apply to the region.
- region
- The region to which the data validation rule should be applied.
| Exception | Description |
|---|---|
| Occurs when is null. | |
| Occurs when is null. | |
| Occurs when the is from a worksheet other than this collection. | |
| Occurs when the already applied to another worksheet. | |
| Occurs when the is invalid based on its rule type's requirements. | |
| Occurs when the one or more of the cells in the already have a data validation rule applied to it. |