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

Validation.RuleSets Property (Visio)

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

Returns the collection of all the validation rule sets in the document. Read-only.

Syntax

expression . RuleSets

expression A variable that represents a Validation object.

Return Value

ValidationRuleSets

Example

The following sample code is based on code provided by: David Parker

The following Visual Basic for Applications (VBA) example shows how to use the RuleSets property to get the names of all the validation rule sets in the active document and print those names in the Immediate window.

Public Sub RuleSets_Example()

    Dim vsoDocument As Visio.Document
    Dim vsoRuleSet As Visio.ValidationRuleSet
    Dim vsoValidationRule As Visio.ValidationRule

    Set vsoDocument = Visio.ActiveDocument

    For Each vsoRuleSet In vsoDocument.Validation.RuleSets

        If vsoRuleSet.Enabled Then

            Debug.Print vsoRuleSet.NameU

        End If
    Next 

End Sub
© 2018 Microsoft