How to hide parts of a menu bar

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

Stuart McCall

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

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