Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default 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
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
CONVERTING Excel 2003 Commands to 2007 Ra Excel Discussion (Misc queries) 5 May 25th 09 01:36 PM
Excel 2007 duplicate icons for different commands T. Valko Excel Discussion (Misc queries) 8 January 27th 08 09:35 PM
Creating Custom Commands on a Toolbar rllngriver Excel Worksheet Functions 1 November 19th 07 07:07 PM
Is there a comparison list of commands? (Excel 2003 vs 2007) dustyr Excel Discussion (Misc queries) 2 August 17th 07 03:28 PM
Deleting custom Commands from File Menu are nor saved next time w. EXCEL CUstomization Excel Worksheet Functions 3 December 7th 04 01:46 AM


All times are GMT +1. The time now is 07:38 AM.

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

About Us

"It's about Microsoft Excel"