Hide/disable submenus

G

Guest

I am trying to hide submenus for people who don't have rights to do specific
things. I can see how to hide the top level menu item (code below) but not
sub-menus. Any help would be appreciated.

Application.CommandBars("Sales Journal").Controls("Management").Visible = True

Thanks in advance.

Tom
 
A

Albert D.Kallal

just keep drilling down...

CommandBars("myCustomBar").
Controls("AdminOptions").
Controls("DleeteInvoice").Visible = True

(the above would be on one line)

So, in the above is have a main menu, we drill down to AdminOptions, and
then select deleteinvoice.

You can drill down as many levels as you need...so, use the controls
collection for each level...

Remember, you can also enable that menu item also.

And, note I used visible...but you can also use .enable to "gray" out the
option...
 

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