Validation.Validate method (Visio)

Validates the specified validation rule set.

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 don't open Issues window.

If you don't 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 evaluation, 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)

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.