ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   disable Menu/toolbar items (https://www.excelbanter.com/excel-programming/382456-disable-menu-toolbar-items.html)

Andrew

disable Menu/toolbar items
 
How do I disable Menu / toolbar items when opening a workbook and enable them
when I close the workbook. Doing this to force the user to use the macro's I
have written.

Mike

disable Menu/toolbar items
 
Application.CommandBars("Tools").Enabled = False

The above placed in the workbook open event will disable the Tools menu.

Application.CommandBars("Tools").Enabled = true

And this placed in the before-close event will re-enable it.

You could in this way disable others by changing Tools to Format for example
but it seems a bit drastic to me.

"Andrew" wrote:

How do I disable Menu / toolbar items when opening a workbook and enable them
when I close the workbook. Doing this to force the user to use the macro's I
have written.


Andrew

disable Menu/toolbar items
 
Hi Mike,

I basically want to disable the print function in the toolbar as well as the
menu and the save / save as buttons.
I did this years ago and just can't rember how to do it again. Do I create a
open event SUB and give the command?

Thanks again.


"Mike" wrote:

Application.CommandBars("Tools").Enabled = False

The above placed in the workbook open event will disable the Tools menu.

Application.CommandBars("Tools").Enabled = true

And this placed in the before-close event will re-enable it.

You could in this way disable others by changing Tools to Format for example
but it seems a bit drastic to me.

"Andrew" wrote:

How do I disable Menu / toolbar items when opening a workbook and enable them
when I close the workbook. Doing this to force the user to use the macro's I
have written.


Ron de Bruin

disable Menu/toolbar items
 
See this page Andrew
http://www.rondebruin.nl/menuid.htm

Post back if you have problems



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Andrew" wrote in message ...
Hi Mike,

I basically want to disable the print function in the toolbar as well as the
menu and the save / save as buttons.
I did this years ago and just can't rember how to do it again. Do I create a
open event SUB and give the command?

Thanks again.


"Mike" wrote:

Application.CommandBars("Tools").Enabled = False

The above placed in the workbook open event will disable the Tools menu.

Application.CommandBars("Tools").Enabled = true

And this placed in the before-close event will re-enable it.

You could in this way disable others by changing Tools to Format for example
but it seems a bit drastic to me.

"Andrew" wrote:

How do I disable Menu / toolbar items when opening a workbook and enable them
when I close the workbook. Doing this to force the user to use the macro's I
have written.



All times are GMT +1. The time now is 02:45 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com