Querying Submenu Items

D

DATarbell

I am trying to determine whether specific items appear in a
sub-menu, but I have been unable to get 'below' the primary
menu item level (e.g., Edit). Can anyone provide a code
sample that determines the presence/absence of a submenu item?
 
K

Klaus Linke

DATarbell said:
I am trying to determine whether specific items appear
in a sub-menu, but I have been unable to get 'below' the
primary menu item level (e.g., Edit). Can anyone provide
a code sample that determines the presence/absence of a
submenu item?


Hi DA,

You should be able to reference them through the name or index.

Whether they are "present/absent" depends on their .Visible property.

MsgBox CommandBars("Menu Bar").Controls("Edit").Controls("Copy").Visible
MsgBox CommandBars("Menu Bar").Controls(2).Controls(6).Visible

Klaus
 

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