Select method
Select method
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
Selects or deselects an object.
Version added
2.0
Syntax
|
|
object |
Required. An expression that returns a Window or Selection object that contains the shapes. |
addObj |
Required. An expression that returns a Shape object to select or deselect. |
selectType |
Required Integer. The type of selection to make. |
Remarks
When used with the Window object, the Select method will affect the selection in the Visio window. The Selection object, however, is independent of the selection in the window. Therefore, using the Select method with a Selection object only affects the state of the object in memory—the Visio window is unaffected.
The following constants declared by the Visio type library show valid values for selection types.
Constant |
Value |
visDeselect |
1 |
visSelect |
2 |
visSubSelect |
3 |
visSelectAll |
4 |
visDeselectAll |
256 |
You can combine visDeselectAll with visSelect and visSubSelect to deselect all shapes prior to selecting or subselecting other shapes.
If the object being operated on is a Selection object, and the Select method selects a Shape object whose ContainingShape property is different than the ContainingShape property of the Selection object, then the Select method deselects everything, even if the selection type value doesn't specify deselection.