Validation.Validate Method (Visio)

Validates the specified validation rule set.

Version Information

Version Added: Visio 2010

Syntax

expression .Validate(RuleSet, Flags)

expression A variable that represents a Validation object.

Parameters

Name

Required/Optional

Data Type

Description

RuleSet

Optional

ValidationRuleSet

The rule set to validate across the entire document.

Flags

Optional

VisValidationFlags

Whether to open the Issues window after validation.

Return Value

Nothing

Remarks

To validate all rule sets active in the document, pass Nothing for RuleSet.

Flags must be one of the following VisValidationFlags constants.

Constant

Value

Description

visValidationDefault

0

Validate document and open Issues window. The default.

visValidationNoOpenWindow

1

Validate document but do not open Issues window.

If you do not set the optional Flags parameter, Microsoft Visio applies the default behavior (visValidationDefault).

When you call the Validate method, Microsoft Visio checks whether the rule set is active before evaluating it. Visio does not display message boxes during the evalution, except to notify you if, when Flags is set to visValidationDefault, it finds no errors; and it displays the progress bar only if Application.ShowProgressBars is True.

Example

The following Visual Basic for Applications (VBA) example shows how to use the Validate method to validate the active document.

' Validate the document.
Call Visio.ActiveDocument.Validation.Validate(,Visio.VisValidationFlags.visValidationDefault)