How to hide parts of a menu bar

  • Thread starter Thread starter Rhys Davies
  • Start date Start date
R

Rhys Davies

Hi - in my application i hide all menu bars for users except for one, the
'file' menu bar, which i enable using the code:
CommandBars("Menu Bar").Controls("File").visible = True

However i only want it to display or enable a couple of the options on the
drop down. I want 'close' and 'print' enabled and i need to disable 'page
setup' , 'print preview' and 'exit'.

Does anyone know how to reference these options?

Thanks,

Rhys.
 
Rhys Davies said:
Hi - in my application i hide all menu bars for users except for one, the
'file' menu bar, which i enable using the code:
CommandBars("Menu Bar").Controls("File").visible = True

However i only want it to display or enable a couple of the options on the
drop down. I want 'close' and 'print' enabled and i need to disable 'page
setup' , 'print preview' and 'exit'.

Does anyone know how to reference these options?

Thanks,

Rhys.

Debug.Print CommandBars("Menu
Bar").Controls("File").Controls("Exit").Caption

Result: E&xit

However, I think a better alternative method would be to create your own
menu bar, dragging the required commands onto it from the Customize dialog.
Then set this as your main menu bar in Startup options. That way the only
time you'll see the full menus is if you open Access in design mode (ie with
a shift key held down).
 
Back
Top