Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
DDE updating | Excel Discussion (Misc queries) | |||
Updating | Excel Discussion (Misc queries) | |||
Updating | Excel Worksheet Functions | |||
When updating a worksheet, how do I create a link updating the sa. | Excel Worksheet Functions | |||
Updating | Excel Programming |