Toggle Selection Mode
Hi Borg,
Application.CommandBars("Drawing").Controls("Selec t Objects").Execute
The above line would programatically click the button for you. Be aware
that it would throw an error if the Select Objects button were not present on
the Drawing toolbar. The following routine would restore the button if it
wasn't there, and then click it.
Sub ToggleSelectObjects()
Dim CBC As CommandBarControl
On Error GoTo RestoreSelectObjectsButton
Set CBC = Application.CommandBars("Drawing").Controls("Selec t Objects")
CBC.Execute
Exit Sub
RestoreSelectObjectsButton:
Set CBC = Application.CommandBars("Drawing").Controls.Add _
(Type:=msoControlButton, ID:=182, Befo=2)
Resume Next
End Sub
Regards,
Vic Eldridge
"borg" wrote:
I am not sure how to ask this but here goes...
In the Drawing Toolbar there is an icon that looks like a white arrow that
allows you to toggle between a "hand" icon or a "NWSE" icon when the cursor
is over a button, can anyone tell me what is the code that allows for the
toggle to switch back and forth? I hope this makes sense.
Thanks!
|