ValidationRuleSet.Enabled property (Visio)

Determines whether the rules in the specified validation rule set are checked when validation is triggered for the current document. Read/write.

Syntax

expression.Enabled

expression A variable that represents a ValidationRuleSet object.

Return value

Boolean

Remarks

If the value of the Enabled property is True, the rules in the validation rule set are checked when validation is triggered for the current document. Validation is triggered when the user clicks Check Diagram on the Process tab or when the Validate method is run on the current document.

Rule sets for which the value of Enabled is False are purged from the current document when the RemoveHiddenInformation method is run with the visRHIValidationRules flag set, or when the equivalent command is issued in the user interface.

Example

The following Visual Basic for Applications (VBA) example shows how to use the Enabled property to enable a validation rule set named "Connectivity" in the active document.

Set vsoDocument = Visio.ActiveDocument

Set vsoValidationRuleSet = vsoDocument.Validation.RuleSets.Add("Connectivity")

' Enable the rule set.
vsoValidationRuleSet.Enabled = True

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.