Remove custom menu
I created a custom menu that loads when a workbook is
opened. This menu is needed only for this one workbook. How, and where, do I write the code to remove the menu when the workbook is closed? TIA |
Hi
Use this events in the thisworkbook module Private Sub Workbook_Activate() End Sub Private Sub Workbook_Deactivate() End Sub Read Chip Pearson's site about Events http://www.cpearson.com/excel/*events.htm -- Regards Ron de Bruin http://www.rondebruin.nl wrote in message ... I created a custom menu that loads when a workbook is opened. This menu is needed only for this one workbook. How, and where, do I write the code to remove the menu when the workbook is closed? TIA |
Ron,
I think you have an extra hypen in your link. http://www.cpearson.com/excel/events.htm Ron de Bruin wrote: Hi Use this events in the thisworkbook module Private Sub Workbook_Activate() End Sub Private Sub Workbook_Deactivate() End Sub Read Chip Pearson's site about Events http://www.cpearson.com/excel/*events.htm -- Regards Ron de Bruin http://www.rondebruin.nl wrote in message ... I created a custom menu that loads when a workbook is opened. This menu is needed only for this one workbook. How, and where, do I write the code to remove the menu when the workbook is closed? TIA -- Dave Peterson |
Thanks Dave
-- Regards Ron de Bruin http://www.rondebruin.nl "Dave Peterson" wrote in message ... Ron, I think you have an extra hypen in your link. http://www.cpearson.com/excel/events.htm Ron de Bruin wrote: Hi Use this events in the thisworkbook module Private Sub Workbook_Activate() End Sub Private Sub Workbook_Deactivate() End Sub Read Chip Pearson's site about Events http://www.cpearson.com/excel/*events.htm -- Regards Ron de Bruin http://www.rondebruin.nl wrote in message ... I created a custom menu that loads when a workbook is opened. This menu is needed only for this one workbook. How, and where, do I write the code to remove the menu when the workbook is closed? TIA -- Dave Peterson |
Hi Dave
Strange that you don't see the - in the thread I copy/paste Chip's link from a old thread (Google) -- Regards Ron de Bruin http://www.rondebruin.nl "Dave Peterson" wrote in message ... Ron, I think you have an extra hypen in your link. http://www.cpearson.com/excel/events.htm Ron de Bruin wrote: Hi Use this events in the thisworkbook module Private Sub Workbook_Activate() End Sub Private Sub Workbook_Deactivate() End Sub Read Chip Pearson's site about Events http://www.cpearson.com/excel/*events.htm -- Regards Ron de Bruin http://www.rondebruin.nl wrote in message ... I created a custom menu that loads when a workbook is opened. This menu is needed only for this one workbook. How, and where, do I write the code to remove the menu when the workbook is closed? TIA -- Dave Peterson |
I see it in this thread--using Netscape 4.79 as my newsreader.
Ron de Bruin wrote: Hi Dave Strange that you don't see the - in the thread I copy/paste Chip's link from a old thread (Google) -- Regards Ron de Bruin http://www.rondebruin.nl "Dave Peterson" wrote in message ... Ron, I think you have an extra hypen in your link. http://www.cpearson.com/excel/events.htm Ron de Bruin wrote: Hi Use this events in the thisworkbook module Private Sub Workbook_Activate() End Sub Private Sub Workbook_Deactivate() End Sub Read Chip Pearson's site about Events http://www.cpearson.com/excel/*events.htm -- Regards Ron de Bruin http://www.rondebruin.nl wrote in message ... I created a custom menu that loads when a workbook is opened. This menu is needed only for this one workbook. How, and where, do I write the code to remove the menu when the workbook is closed? TIA -- Dave Peterson -- Dave Peterson |
All times are GMT +1. The time now is 11:03 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com