Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cannot remove custom commands from 2007 add-ins tab
Greetings. we have code that worked fine in 2003 to add menu items to the
Tools menu and then remove them when Excel closed. Now in 2007, the code adds the menu items to the Add-ins tab as a "custom command". And the code that removed the additions from the Tools menu does not remove the additions to the Add-ins tab. The code is looking for additions to the Tools menu, which obviously didn't happen. I can find no reference to a custom commands collection and thus can find no way to remove the additions to the Add-ins tab. Even worse, the additions to the Add-ins tab increases each time the workbooks are opened. As we have quite a few workbooks that add menu items to the Tools menu, the Add-in tab is getting cluttered. We have found that deleting the XLB file at least resets the Add-in tab. It also is not a satisfactory solution for obvious reasons. So, how does one use code to remove the custom commands that Excel puts under the Add-in tab? Help! George |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Cannot remove custom commands from 2007 add-ins tab
I find this code works as expected to add a command to the add-ins tab and
remove it. Sub AddToTools() With CommandBars("Tools").Controls.Add(msoControlButton ) .Caption = "My Command" End With End Sub Sub RemoveFromTools() CommandBars("Tools").Controls("My Command").Delete End Sub Can you post code (slimmed down to its essentails) that shows the problem? -- Jim "George Burdell" wrote in message ... Greetings. we have code that worked fine in 2003 to add menu items to the Tools menu and then remove them when Excel closed. Now in 2007, the code adds the menu items to the Add-ins tab as a "custom command". And the code that removed the additions from the Tools menu does not remove the additions to the Add-ins tab. The code is looking for additions to the Tools menu, which obviously didn't happen. I can find no reference to a custom commands collection and thus can find no way to remove the additions to the Add-ins tab. Even worse, the additions to the Add-ins tab increases each time the workbooks are opened. As we have quite a few workbooks that add menu items to the Tools menu, the Add-in tab is getting cluttered. We have found that deleting the XLB file at least resets the Add-in tab. It also is not a satisfactory solution for obvious reasons. So, how does one use code to remove the custom commands that Excel puts under the Add-in tab? Help! George |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
CONVERTING Excel 2003 Commands to 2007 | Excel Discussion (Misc queries) | |||
Excel 2007 duplicate icons for different commands | Excel Discussion (Misc queries) | |||
Creating Custom Commands on a Toolbar | Excel Worksheet Functions | |||
Is there a comparison list of commands? (Excel 2003 vs 2007) | Excel Discussion (Misc queries) | |||
Deleting custom Commands from File Menu are nor saved next time w. | Excel Worksheet Functions |