Version

Item Property (DataValidationRuleCollection)

Gets or sets the references which have the data validation rule applied to it.
Syntax
'Declaration
 
Public Default Property Item( _
   ByVal rule As DataValidationRule _
) As WorksheetReferenceCollection
public WorksheetReferenceCollection this[ 
   DataValidationRule rule
]; {get; set;}

Parameters

rule
A data validation rule.
Exceptions
ExceptionDescription
System.ArgumentNullExceptionOccurs when the rule is null.
System.Collections.Generic.KeyNotFoundExceptionOccurs when the property is retrieved and the rule is not applied to the Worksheet.
System.ArgumentException Occurs when the property is set and the value is from a Worksheet other than this collection.
System.ArgumentExceptionOccurs when the property is set and the rule is invalid based on its rule type's requirements.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, 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