1

I created a basic custom Excel ribbon tab with 5 buttons. When I edit the custom ribbon (using Office RibbonX Editor) everything works fine when I launch the Excel file for the first time after the ribbon edit.

But the problem is when I close my Excel file and I want to reopen it again (for the second time), there's no single sign my custom ribbon tab ever existed. My custom tab keeps disappearing. When I open Office RibbonX Editor again, the XML file is also empty. Is this problem fixable? I want to be able to close my Excel file, open it again, and use my custom ribbon as many times as I want.

Here is the XML code of my custom tab:

<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui"> 
  <ribbon startFromScratch="false"> 
    <tabs> 
      <tab id="voetbalOpstellingTab" label="Voetbalopstelling" insertBeforeMso="TabHome"> 
        <group id="openMainWindowGroup" label="Home"> 
            <button id="openMainWindow" image="home" size="large"
            label="Open het hoofdscherm" description="Open het hoofdscherm"
            screentip="Open het hoofdscherm" 
            onAction="ribbonTab.openMainWindow"/>
        </group>
      <group id="viewGroup" label="Weergeven"> 
            <button id="openPlayersSheet" image="group" size="large"
            label="Spelers weergeven" description="Geef de spelers weer"
            screentip="Geef de spelers weer" 
            onAction="ribbonTab.openPlayersSheet"/>
        <button id="openWedstrijdSheet" image="dashboard" size="large"
            label="Overzicht weergeven" description="Geef het overzicht van wie, waar tijdens welke wissel heeft gespeeld weer"
            screentip="Geef het overzicht van wie, waar tijdens welke wissel heeft gespeeld weer" 
            onAction="ribbonTab.openWedstrijdSheet"/>
        </group>
      <group id="actionsGroup" label="Acties"> 
            <button id="openAddPlayerWindow" image="add-user" size="large"
            label="Speler toevoegen" description="Voeg een speler toe"
            screentip="Voeg een speler toe" 
            onAction="ribbonTab.openAddPlayerWindow"/>
        <button id="openRemovePlayerWindow" image="remove-user" size="large"
            label="Speler verwijderen" description="Verwijder een speler"
            screentip="Verwijder een speler" 
            onAction="ribbonTab.openRemovePlayerWindow"/>
        </group>
      </tab> 
    </tabs> 
  </ribbon> 
</customUI>

Can someone please help me? Thanks in advance!

1 Answers1

1

You are referring to some built-in controls on the ribbon. Make sure all of them are available when Excel is open. Otherwise, your custom UI will not be created.


Do you get Ribbon UI errors when your custom UI disappears?

By default, if an add-in attempts to manipulate the Microsoft Office user interface (UI) and fails, no error message is displayed. However, you can configure Microsoft Office applications to display messages for errors that relate to the UI. You can use these messages to help determine why a custom ribbon does not appear, or why a ribbon appears but no controls appear.

To show VSTO Add-in user interface errors 1. Start the application. 2. Click the File tab. 3. Click Options. 4. In the categories pane, click Advanced.

In the details pane, select Show VSTO Add-in user interface errors, and then click OK.

Eugene Astafiev
  • 47,483
  • 3
  • 24
  • 45