Selection.Move Method
Visio Automation Reference |
Moves a selection a specified distance. Returns Nothing.
Version Information
Version Added: Visio 2003
Syntax
expression.Move(dx, dy, UnitsNameOrCode)
expression A variable that represents a Selection object.
Parameters
Name | Required/Optional | Data Type | Description |
---|---|---|---|
dx | Required | Double | Specifies the amount to move in the x-direction. |
dy | Required | Double | Specifies the amount to move in the y-direction. |
UnitsNameOrCode | Optional | Variant | Specifies the units to use for dx and dy. See Remarks for possible values. The default is inches. |
Return Value
Nothing
Remarks
You can specify UnitsNameOrCode as an integer (a member of VisUnitCodes) or a string value such as "inches". If the string is invalid or the unit code is inappropriate (nontextual), an error is generated.
For a complete list of valid unit strings along with corresponding Automation constants (integer values), see About units of measure.
Example
This Microsoft Visual Basic for Applications (VBA) macro shows how to use the Move method to move a selection by a specified amount.
Visual Basic for Applications |
---|
|
See Also