Custom controls not showing in Add-ins ribbon tab and XML error

Shneuph

New Member
Joined
Jul 17, 2013
Messages
7
Hello..

This is my first time posting a question so I'm sorry if I don't follow protocol exactly. I'll try.
We are using Windows7 with Excel 2007. We have old code from excel 2003 and earlier that was adding a msoControlPopup with other sub-controls using the code below:
Code:
    Set HelpMenu = CommandBars(1).FindControl(Id:=30010)
    
    If HelpMenu Is Nothing Then
'       Add the menu to the end
        Set AirFlowMenu = CommandBars(1).Controls.Add _
          (Type:=msoControlPopup, temporary:=True)
    Else
'      Add the menu before Help
        Set AirFlowMenu = CommandBars(1).Controls.Add _
          (Type:=msoControlPopup, Before:=HelpMenu.Index, temporary:=True)
    End If

'   Add a caption for the menu
    AirFlowMenu.Caption = "&Air Circulation"
    
'   FIRST MENU ITEM A
    Set MenuItem = AirFlowMenu.Controls.Add _
      (Type:=msoControlButton)
    With MenuItem
        .Caption = "&Save Air Circulation"
        .ShortcutText = "Ctrl+Shift+S"
        .FaceId = 3
        .OnAction = "SaveFileAsDir"
    End With
etc...

It still works in Excel 2007 and adds a pulldown in the Add-ins ribbon tab. However, randomly yesterday it stopped showing up in only MY add-ins ribbon tab. It still shows in other users ribbons. Now, I also checked the box in Excel Options>Advanced>Show Add-in user interface errors and when I have that checked I get this error when Excel opens:

msgbox title "Custom UI Runtime Error in Send to Bluetooth"
msgbox content:
Error found in Custom UI XML of "Send to Bluetooth":

Line:1
Column:199
Error Code 0xC00CEE21
Whitespace expected

buttons: OK, OK to All

(sorry, IDK if I can attach an image of that msgbox)

I tried going to Excel Options>Customize>Reset to reset any customizations to the quick access toolbar as this was recommended by something else I found online. This did not fix the problem.

I can find the control in the Immediate window but it just isn't showing in the add-ins tab.
Any suggestions? Does anyone know if I can find and repair that XML file perhaps?
Thank you.
 

Some videos you may like

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

sijpie

Well-known Member
Joined
Nov 1, 2008
Messages
3,573
Can you make a macro to just unload the menu from the Add-in? perhaps for some perverse reason it didn't unload properly last time you closed it, which now prevents it from loading a second copy
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
34,688
Office Version
365, 2019, 2016, 2010
Platform
Windows, MacOS
Your code doesn't seem to have anything to do with the error message. What other add-ins do you have loaded?
 

Shneuph

New Member
Joined
Jul 17, 2013
Messages
7
I have the following COM add-ins enabled:
1) Acrobat PDFMaker Office COM Addin
2) BluebeamOfficeAddIn
3) Send to Bluetooth

The error message seems to be caused by the send to bluetooth addin. I've tried disabling it and enabling it again and it doesn't fix the problem.
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
34,688
Office Version
365, 2019, 2016, 2010
Platform
Windows, MacOS
I wouldn't expect that to fix anything. I think you'll probably need to disable it.
 

Shneuph

New Member
Joined
Jul 17, 2013
Messages
7
Thanks for your help Rory.. I've disabled all COM addins. Now the addins tab on the ribbon doesn't even show up. I can see my custom control with commandbars(1).controls(10).caption but it doesn't show in the addins tab. (like I said.. the tab doesn't even show) I think there is a problem with the ribbon xml file (as the error message indicates) and therefore my controls do not show in the Ribbon. I don't know where the xml file is or how to fix it though. Any ideas on how to check/fix that?
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
34,688
Office Version
365, 2019, 2016, 2010
Platform
Windows, MacOS
I can see my custom control with commandbars(1).controls(10).caption but it doesn't show in the addins tab. (like I said.. the tab doesn't even show)
What do you mean by that - where can you see the control?
 

Shneuph

New Member
Joined
Jul 17, 2013
Messages
7
I just mean the control exists (it has been added to commandbars(1) ). However, I can't see the controls visually anywhere in the GUI. It is not automatically showing up in the addins tab like it has in the past.
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
34,688
Office Version
365, 2019, 2016, 2010
Platform
Windows, MacOS
Have you thought about reworking the workbook to use the Ribbon properly?
 

Forum statistics

Threads
1,089,476
Messages
5,408,473
Members
403,208
Latest member
JFoley182

This Week's Hot Topics

  • help please
    SORRY NOT ANY GOOD AT EXCEL SO HELP WOULD BE MUCH APPRECIATED this formula is in a sheet called ignore...
  • two formulas needed
    Hello, I'll try my best to explain this: First formula needed in Sheet1 cell A2: If Sheet1 cell B2 = Sheet2 cell B2 then return a 1. If not then...
  • Dynamic Counts
    Good afternoon, we are tidying up some data & the data seems to be growing quicker than we are tidying it up! What we confirm (by reviewing it...
  • Help Excel formula eliminate duplicate values and keep only 2 identical rows.
    as picture below column A has a duplicate value. but the values are not the same as the rule. sometimes 4 rows, sometimes 10 rows or 7 or 9...
  • Macro Compile Error Sub or Function not defined
    Hello, I am trying to run macros from a validation list, all macros have been created and run perfectly on there own but I'm getting a compile...
  • Last row combined with Current Region VBA
    I'm generally happy finding the last row of data through something like Lastrow = Cells(Rows.Count, "D").End(xlUp) but I don't always receive data...
Top