View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Updating an Add-in

On Error Resume Next
application.Commandbars("Custom 1").Delete
On Error goto 0

or similar at the beginning of your install routine.

--
Regards,
Tom Ogilvy

"ExcelMonkey" wrote in message
...
I have an Add-in that I have created. Upon installing it
via Tools\Add-Ins.. It creates a new menu item. Now I am
anticipating having to update and distribute this Add-in
as time goes on. However, I will not be using an
installation program to do this. Hence there is a risk
that the user will not install it properly. If the user
does not uninstall the old version first(i.e. delete old
menu item), then upon installing the new version, the menu
item will be installed again (i.e. two menu items that are
exactly the same).

Is is possible to write code that says if upon installing,
if the menu item already exists, then delete the old one
and install the new one?