Table of contents
TOC
折叠目录
展开目录

ValidationRule.RuleSet 属性 (Visio)ValidationRule.RuleSet Property (Visio)

office 365 dev account|上次更新日期: 2018/3/13
|
2 参与人员

返回包含指定的验证规则的ValidationRuleSet对象。只读的。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

ValidationRuleSetValidationRuleSet

示例Example

下面的 Visual Basic for Applications (VBA) 的示例演示如何使用规则集属性可以有选择地删除属于特定的规则集的验证问题。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
© 2018 Microsoft