Place a tick in a drop down menu

D

dominicb

Hi all

I have some code that places a tick in a dropdown menu added to the
menu bar. The code I am using is this :

Application.CommandBars(1).Controls("&Ultimate").Controls(12).State =
msoButtonUp

This works really well, however I am now trying to add a tick to a
submenu item as well (in a similar way to the View > Toolbars menu item
in Excel) but I just can't get the syntax correct.

Can anyone point me in the right direction?

Thanks

DominicB
 
B

Bob Phillips

It would be something like

Application.CommandBars(1).Controls("&Ultimate").Controls(12).Controls("myBu
tton").State = msoButtonUp


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
D

dominicb

Hi Bob

I couldn't get it to work with the code you gave me, but I adapted it
and used the "count" method and used this code to get a button up /
down effect on menu item 1, submenu item 1 :

Application.CommandBars(1).Controls("&My
Menu").Controls(1).Controls(1).State = msoButtonDown

Thanks very much for the pointer!

DominicB
 

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