View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Detect Custom Menu

Hi Scott

One way

On the first line of the macro that create the menu delete your menu firs if it exist

On Error Resume Next
Application.CommandBars("MyCustomMenu").Delete
On Error GoTo 0

Then create your menu



--
Regards Ron de Bruin
http://www.rondebruin.nl



"scott" wrote in message ...
I've got my vba code creating a custom menu called "mymenu". The code only loads the menu when certain spreadsheets open
containing my criteria.

What I can't figure out is how to detect if "mymenu" has already been loaded and if it has, don't load it a 2nd time. This happens
sometimes because the user opens up several spreads that contain my special criteria in certain cells.

Any ideas?