Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default Updating an Add-in

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?


  #2   Report Post  
Posted to microsoft.public.excel.programming
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?




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,441
Default Updating an Add-in

Add this to the top of your code, changing the name to match your button
name, assuming that you have added your button to the Tools menu. Otherwise,
you do something similar.

Dim ToolsMenu As CommandBarPopup
Set ToolsMenu = Application.VBE.CommandBars(1).FindControl(, 30007)
ToolsMenu.Controls("This is your control Name").Delete

HTH,
Bernie
MS Excel MVP

"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?




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
DDE updating CRAIG K Excel Discussion (Misc queries) 1 February 20th 08 08:21 AM
Updating Jeff Excel Discussion (Misc queries) 1 August 3rd 07 02:54 PM
Updating dpal Excel Worksheet Functions 0 December 27th 06 03:42 PM
When updating a worksheet, how do I create a link updating the sa. Phlashh Excel Worksheet Functions 9 January 27th 05 06:05 PM
Updating Aaron Neunz Excel Programming 3 July 1st 04 04:55 PM


All times are GMT +1. The time now is 08:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"