Window.SelectedValidationIssue property (Visio)

Gets or sets the validation issue that is selected in the Issues window. Read/write.

Syntax

expression. SelectedValidationIssue

expression A variable that represents a Window object.

Return value

ValidationIssue

Remarks

Attempting to get or set the SelectedValidationIssue property on a window other than the Issues window, or when the Issues window is closed, returns an error.

If multiple issues are selected in the Issues window, Visio returns the issue that has the focus.

If no issue is selected, Visio returns Nothing. By default, issues that you have specified to be ignored are not displayed. If you set the property to Nothing, Visio clears the selection in the Issues window.

Example

The following Visual Basic for Applications (VBA) example shows how to use the SelectedValidationIssue property to get the validation issue that is currently selected in the Issues window. If no issue is selected, the code displays a message box prompting the user to select an issue.

Set vsoIssuesWindow = Application.ActiveWindow.Windows.ItemFromID(Visio.VisWinTypes.visWinIDValidationIssues)
    
' If the Issues window is visible, find the selected validation issue.
    If vsoIssuesWindow.Visible Then
       Set vsoValidationIssue = vsoIssuesWindow.SelectedValidationIssue
    End If
    
' Respond to the case when no validation issue is selected. 
    If vsoValidationIssue Is Nothing Then
        MsgBox "Please select an issue."
    End If

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.