Returns a reference to the global Map object.
Read-only property
Set variable = object.Map |
Map Object
The Map object is exposed globally. That means you can directly access the properties and methods of the Map object from any routine without first obtaining a reference to that object. For example, the following VBScript code displays the X coordinate of the pointer location in a message box:
Sub DisplayXLoc
Dim objTheMap
Set objTheMap = Application.Map
MsgBox CStr(objTheMap.PointerX)
End Sub
Since the Map object is global, the above example can be shortened to the following one line example:
Sub DisplayXLoc
MsgBox CStr(Map.PointerX)
End Sub
Sub DisplayXLoc
Dim objTheMap
Set objTheMap = Application.Map
MsgBox CStr(objTheMap.PointerX)
End Sub
Since the Map object is global, the above example can be shortened to the following one line example:
Sub DisplayXLoc
MsgBox CStr(Map.PointerX)
End Sub