Hide/disable submenus

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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...
 
Back
Top