Custom XML Ribbon - Button pivot insert not showing

Climo

New Member
Joined
Jul 23, 2021
Messages
9
Office Version
  1. 365
Platform
  1. Windows
Hello !
I am using a custom ribbon design, made in XML, for excel (Office 365 version)

Recently, the button to insert a pivot table suddenly disappeared on my custom tab in the ribbon. It previously worked without any problem.
Related code: <button idMso="PivotTableInsert" label="Vers TCD"/>

Concurrently, the same button on my Insert Tab changed to a split button, I gather the two events are linked. Did they change the idMso (or the way to call them) for this particular function ?
PivotInsert.png


Thanks in advance !
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Without looking at the complete CustomUI xml's no one can tell you what has been changed.
The even the Related code you provided seems to be incomplete.
But yes - if there is a change in the ribbon - there is a change in the customui xml part.
Who has done it and how is a completely different matter. It all depends on how the custom ui is implemented - is it hardcoded in the file or in an addin or loaded through code.
 
Upvote 0
I don't think my explanation was clear enough. The image showing the change is taken from original Insert Tab on ribbon, not custom UI. And at the same time, my code (for another custom tab) stopped working, for this button only.

The custom UI is charged through a simple add-in, I also tried opening the source file as excel file, with similar result (everything working except the Insert Pivot button).

XML:
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="onLoadRibbon">
  <ribbon startFromScratch="false">
    <tabs>
      <tab id="Mytab" label="MyTab" insertBeforeMso="TabHome" keytip="À">
        
    ...
      
      <group id="GroupeInsertTableau" label="Tableaux" imageMso="FormatAsTableGallery">
          ...
          <button idMso="PivotTableInsert" label="Vers TCD"/>
          ...
            
      </group>

    ...

    </tabs>
  </ribbon>
</customUI>
 
Upvote 0
I haven't found how to modify the previous message (is it hidden for new members?), but I did include the tag </tab> in the original code.
 
Upvote 0
<button idMso="PivotTableInsert" label="Vers TCD"/>
the button specs do not contain a callback to a function so there is no action associated with it. So nothing will happen on clicking it.
it must be something like:
XML:
<button idMso="PivotTableInsert" label="Vers TCD" onAction="btnOnClick"/>
then when clicked the button will start a sub in your code called btnOnClick and it will do something.
 
Upvote 0
the button specs do not contain a callback to a function so there is no action associated with it. So nothing will happen on clicking it.
it must be something like:
XML:
<button idMso="PivotTableInsert" label="Vers TCD" onAction="btnOnClick"/>
then when clicked the button will start a sub in your code called btnOnClick and it will do something.

I am a little bit confused by your answer. My understanding was that onAction tag was needed for a custom control (id="..."), but superfluous for a "original" control (idMso="...").

That is how I proceed, and it worked flawlessly for the numerous controls with idMso tag and no onAction tag.
 
Upvote 0
I am a little bit confused by your answer. My understanding was that onAction tag was needed for a custom control (id="..."), but superfluous for a "original" control (idMso="...").

That is how I proceed, and it worked flawlessly for the numerous controls with idMso tag and no onAction tag.
I forgot to add that my problem is not that the button doesn't work, it is that the button doesn't appear anymore. It used to appear and work, before what I believe was an update of Excel.
 
Upvote 0
of course you are right, I did overlook this fact - idMSO and not id.
However built-in commands can be altered through the xml. And to duplicate/clone an existing control I think you should use Control rather than Button.

You can turn on the excel option to show user interface errors and see if you get any error during customui xml loading.
 
Upvote 0
of course you are right, I did overlook this fact - idMSO and not id.
However built-in commands can be altered through the xml. And to duplicate/clone an existing control I think you should use Control rather than Button.

You can turn on the excel option to show user interface errors and see if you get any error during customui xml loading.

Thank you for the tip ! Unfortunately it did not work this time, it only found errors on third-party add-in.

I tried from a cleaned workbook, deleting all superfluous xml and vba, with only the following xml code. I also deactivated all other add-ins / complements to isolate this part.

XML:
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
  <ribbon startFromScratch="false">
    <tabs>
      <tab id="TestTab" label="Custom Tab" insertBeforeMso="TabHome">
          <group id="GroupeInsertTableaubis" label="GroupTest">
              <button idMso="TableInsertExcel" size="large"/>
              <control idMso="PivotTableInsert" size="large"/>
          </group>
      </tab>
    </tabs>
  </ribbon>
</customUI>

Result is still the same: it shows only the first button (idMso "TableInsertExcel"), not the second. :/
I also tried with the tag "button" instead of "control", with the same result.
 
Upvote 0
insertBeforeMso="TabHome"
Try to remove this...
Aaah, it actually shows the custom tab, just not the buttons? And no ui error?
I'll test your xml in a minute
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,772
Members
452,353
Latest member
strainu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top