View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Select Object Button

If you mean toggle up/down simply

CommandBars.FindControl(ID:=182).Execute

or with a bit more control

Sub Toggle182(nState As Long)
Dim ctr As CommandBarButton
Set ctr = Application.CommandBars.FindControl(ID:=182)
If ctr.State < nState Then
ctr.Execute
End If
End Sub

Sub test()
Toggle182 msoButtonDown ' -1
Stop
Toggle182 msoButtonUp ' 0

End Sub


Regards,
Peter T


"pan65" wrote in message
...
I am using Excel 2000. Near the bottom left corner is the Select Object
button with the arrow cursor icon. Can this button be toggled on and off
using VBA code? If so, how? Thanks.