"box-select" mode

G

Guest

Hi,

I now understand that:
Application.CommandBars("Drawing").Controls("Select Objects").Execute puts
me into the box-select mode. And running
Application.CommandBars("Drawing").Controls("Select Objects").Execute again
puts me out of box-select mode.

Is there a way to tell if the control("select objects") is currently
selected because sometimes I want to only excute that code if it is not
currently in the box-select mode.

Thanks for you help!
 
D

Dave Peterson

Maybe you can use something like:

Dim myCtrl As CommandBarControl
Set myCtrl = Application.CommandBars("Drawing").Controls("Select Objects")
If myCtrl.State = msoButtonUp Then
MsgBox "ready to turn on"
myCtrl.Execute
Else
MsgBox "already clicked"
myCtrl.Execute
End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top