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

Selection.SelectAll Method (Visio)

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

Selects all possible shapes in a window or selection.

Syntax

expression . SelectAll

expression A variable that represents a Selection object.

Return Value

Nothing

Example

This Microsoft Visual Basic for Applications (VBA) macro shows how to select all the shapes on the page.


Public Sub SelectAll_Example() 

 Const MAX_SHAPES = 6 
 Dim vsoShapes(1 To MAX_SHAPES) As Visio.Shape 
 Dim intCounter As Integer 

 'Draw six rectangles. 
 For intCounter = 1 To MAX_SHAPES 
 Set vsoShapes(intCounter) = ActivePage.DrawRectangle(intCounter, intCounter + 1, intCounter + 1, intCounter) 
 Next intCounter 

 'Deselect all the shapes on the page. 
 ActiveWindow.DeselectAll 

 'Select all the shapes on the page. 
 ActiveWindow.SelectAll 

End Sub
© 2018 Microsoft