Table of contents
TOC
Collapse the table of content
Expand the table of content

ValidationRule.RuleSet Property (Visio)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

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

Syntax

expression . RuleSet

expression A variable that represents a ValidationRule object.

Return Value

ValidationRuleSet

Example

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
© 2017 Microsoft