ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Change Workbook Event (https://www.excelbanter.com/excel-programming/321689-change-workbook-event.html)

Ronbo

Change Workbook Event
 
I have a procedure on Workbook_Open that removes all toolbars, commandbars,
etc. and it restores them on Workbook_BeforeClose. However if a user has
opened this workbook and them opens or goes to another they will not have any
toolbars. My question is there a way such as an event procedure that if one
switch workbooks it will restore the toolbars and then upon returning remove
the toolbars?

As always, thank a lot any help.

Regards

Ben

Change Workbook Event
 
In the same workbook that removes the menus, use the
Workbook_Deactivate
event
this will trigger whenever another workbook is activated over it
Note:
to delete the menu's again once this workbook is activated you will need to
use the
Workbook_Activate
event


"Ronbo" wrote:

I have a procedure on Workbook_Open that removes all toolbars, commandbars,
etc. and it restores them on Workbook_BeforeClose. However if a user has
opened this workbook and them opens or goes to another they will not have any
toolbars. My question is there a way such as an event procedure that if one
switch workbooks it will restore the toolbars and then upon returning remove
the toolbars?

As always, thank a lot any help.

Regards



All times are GMT +1. The time now is 10:36 AM.

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