Version

Add(TwoConstraintDataValidationRule,WorksheetCell) Method

Syntax
'Declaration
 
Public Overloads Sub Add( _
   ByVal rule As TwoConstraintDataValidationRule, _
   ByVal cell As WorksheetCell _
) 
public void Add( 
   TwoConstraintDataValidationRule rule,
   WorksheetCell cell
)

Parameters

rule
The data validation rule to apply to the cell.
cell
The cell to which the data validation rule should be applied.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionOccurs when rule is null.
System.ArgumentNullExceptionOccurs when cell is null.
System.ArgumentExceptionOccurs when the cell is from a worksheet other than this collection.
System.ArgumentExceptionOccurs when the rule already applied to another worksheet.
System.ArgumentExceptionOccurs when the rule is invalid based on its rule type's requirements.
System.ArgumentExceptionOccurs when the cell already has a data validation rule applied to it.
System.ArgumentExceptionOccurs when the cell is a total cell of a table.
Requirements

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

See Also

View on GitHub