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

ValidationRule.AddIssue Method (Visio)

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

Creates a new validation issue that is based on the validation rule, and adds it to the document.

Syntax

expression . AddIssue( [TargetPage] , [TargetShape] )

expression A variable that represents a ValidationRule object.

Parameters

NameRequired/OptionalData TypeDescription
TargetPageOptionalPageThe page that has the issue. May be Nothing .
TargetShapeOptionalShapeThe shape that has the issue. May be Nothing .

Return Value

ValidationIssue

Remarks

TargetPage and TargetShape identify the specific object that is associated with the issue. If the object that you pass for either parameter is not a valid object, or if it is inconsistent with the rule's target type, Microsoft Visio returns an Invalid Parameter error.

If you do not pass a value for the optional TargetShape parameter, the validation issue target is the page.

If you do not pass values for either of the optional parameters, the validation issue target is the document.

Example

The following Visual Basic for Applications (VBA) example shows how to use the AddIssue method to add a custom validation issue to a validation rule and associate it with a particular shape on a particular page.

' Add a custom issue to the vsoValidationRule validation rule and 
' associate it with shape vsoShape on page vsoPage.
Set vsoValidationIssue = vsoValidationRule.AddIssue(vsoPage, vsoShape)
© 2017 Microsoft