Object: CommandBarButton Object
Access: Read/Write
Sets or returns the procedure associated with the commandbar button.
CommandBarButton.ExecuteMethod = String
None.
A string that represents the procedure to be run when the button is clicked.
'
' This example add a menu entry to execute a method defined in the script
'
' With the menu controls collection
Set button = myMenuCtrls.Add
button.Caption = "Zoom Selected"
button.Target = ScriptEngine
button.ExecuteMethod = "myZoomSelectedMethod"
' call function below with this name
button.DescriptionText = "Zoom around selected objects"
Sub myZoomSelectedMethod( )
' zoom around selected objects
doc.ActiveViewEx.SetExtentsToSelection
End Sub