'Declaration Public Overloads Sub Add( _ ByVal rule As DataValidationRule, _ ByVal references As WorksheetReferenceCollection _ )
public void Add( DataValidationRule rule, WorksheetReferenceCollection references )
Exception | Description |
---|---|
System.ArgumentNullException | Occurs when rule is null. |
System.ArgumentNullException | Occurs when references is null. |
System.ArgumentException | Occurs when the references are from a worksheet other than this collection. |
System.ArgumentException | Occurs when the rule already applied to another worksheet. |
System.ArgumentException | Occurs when the rule is invalid based on its rule type's requirements. |
System.ArgumentException | Occurs when the one or more of the cells in the references collection are in the totals row of a table. |
Target Platforms: Windows 8.1, Windows 8.1, Windows 8, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
View on GitHub