Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

ValidationRule.RuleSet Property (Visio)

Returns the ValidationRuleSet object that contains the specified validation rule. Read-only.

Version Added: Visio 2010

expression .RuleSet

expression A variable that represents a ValidationRule object.

Return Value

ValidationRuleSet

The following Visual Basic for Applications (VBA) example shows how to use the RuleSet property to selectively delete validation issues that belong to a particular rule set.

Set vsoDocument = Visio.ActiveDocument 
Set vsoIssues = vsoDocument.Validation.Issues
intIssueTotal = vsoIssues.Count
intIssueNumber = 1

' Iterate through the validation issues.
 For intCurrentIssue = 1 To intIssueTotal
      Set vsoIssue = vsoDocument.Validation.Issues(intIssueNumber)
      
     ' Delete the issues that belong to the vsoValidationRuleSet rule set.
     If vsoIssue.Rule.RuleSet Is vsoValidationRuleSet Then
         vsoIssue.Delete
     Else
        intIssueNumber = intIssueNumber + 1
     End If
     
 Next intCurrentIssue
Show:
© 2015 Microsoft