View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Gary Brown[_5_] Gary Brown[_5_] is offline
external usenet poster
 
Posts: 236
Default Create/Remove Custom Menu Items from Add-in

Why not use the 'Workbook_Open' procedure of the ThisWorkbook Object of your
add-in to create your menu and the 'Workbook_BeforeClose' procedure to delete
your menu?
HTH,
Gary Brown

"Michael Malinsky" wrote:

I have an add-in in which I have an Auto_Open event which creates a
custom menu item on the Worksheet Menu Bar to run other code in the
add-in. I was reading some stuff here in the NG about the AddinInstall
event and was wondering if that would be the more appropriate event to
use. Would using AddinInstall cause the custom menu to automatically
appear when the add-in is installed? Would the AddinUninstall event
work similarly?

Bottom line...to be "clean" I would like to have the custom menu item
to appear when the add-in in installed via ToolsAdd-ins and disappear
when the add-in in uninstalled via ToolsAdd-ins if this is even
possible.

Thanks for the help.

Mike.