Restricting use of menus and toolbars

B

Brian

I have an application workbook where I need to restrict
actions that can be done by the user, specifically I need
to remove some or all of the toolbars and Menubar items
and also disable the use of the right ckick to customise
and switch on or off toolbars etc.

All that I want to be visible and enabled are the
following:
On the Menu Bar:
File Tools Help
Close Protection About Microsoft Excel
Save
Print Preview
Print
Exit

Also I do not want any of the toolbars visible or enabled.

Can anyone give me guidance as to the code or macros for
how this can be done, it should be set only when the
workbook is opened and active, and should be reset to the
users normal settings when the workbook is closed or not
active.

Thank you in advance for any assistance.

Brian
 
T

Tushar Mehta

Turn on the macro recorder (Tools | Macro > Record new macro...), do
whatever you want to do with the menu system, and turn off the
recorder. XL will give you the necessary code to accomplish your task.

Do keep in mind that once you have XL in this 'limited capability'
environment, you must have some way to restore full functionality
*irrespective* of what happens next -- including, but not restricted
to, the cases where XL might crash, the OS might crash, or there might
be a power failure.

--
Regards,

Tushar Mehta, MS MVP -- Excel
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 

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