View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Troubled User Troubled User is offline
external usenet poster
 
Posts: 85
Default Command Bar Excel 2007

Thanks Jim. Ended up being a Menu control that was added sometime in 2001.
It did not display in Excel 2003, but was still in the file and would display
in the Command control (although inoperable and unable to remove in code). I
saved the 2003 file as a 2007 file and it removed it. I then saved the 2007
file back as a 2003 file and everything seems to be fine.

Thanks for your efforts!



"Troubled User" wrote:

I can delete custom menu items that I create in VB by using:

Application.Commandbars(1).Controls("TheControl"). Delete

However, in this file there is now a menubar (I don't know how it is being
added as I am not doing it in code) called "Print All Sheets".

I have tried to reference it by name as
Application.CommandBars.Controls("Print All Sheets".Delete but get nothing
(although this works perfect on the others that I add in VB").

I can delete it by right clicking on it and selecting "Delete Custom
Command", however it reloads itself (before my VB menu Add Ins are accessed)
when the file is reopened.

Any ideas are much appreciated.