Submenu

  • Thread starter Thread starter Vino
  • Start date Start date
Vino said:
does anybody knows how to disable a submenu in VB ?


Just follow the CommandBars object model. Check it in Help
for details.

Probably something like:
CommandBars!mainbar.Controls!submenu.Enabled = False
 
Marsh,

My logic is here -

I'm going to assign permissions to users , the user can access only the
form allotted . others must be disabled . there are nearly 30 forms in
each module and total of 12 modules. only hard coding is possible for
this ? no other way ?


Note: i'm retrieving the form name in a temp variable.



Regards,
Vino
 
Well, something has to be used to indicate what's enabled
and what's disabled. The only ways I can think of to do
that without code is by using each form's Toolbar/Menubar
properties, but by itself this requires a separate tool/menu
bar for each combination of (enabled/disabled) controls.

Far more flexible is to use more generic tool/menu bars in
combination with a VBA procedure to provide context related
customizations. Small bits of code could be used in each
form, or it may be better to isolate this logic in a general
purpose procedure.

Some people advocate taking that a step further by using one
or more tables to specify the entire tool/menu bar structure
and build them on the fly as needed.
 
Back
Top