Submenu

  • Thread starter Thread starter Vino
  • Start date Start date
V

Vino

Dear all,

does anybody knows how to disable a submenu in VB ?

Thanks in advance

Vino
 
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.
 

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

Back
Top