Ribboning more challenging than hoped for...2nd pair of eyes on xml for ribbon tab please

OaklandJim

Board Regular
Joined
Nov 29, 2018
Messages
77
Office Version
  1. 2019
Platform
  1. Windows
Ribbonmasters

The ribbon journey was more arduous than I expected. Want to add worksheet specific ribbon tabs. Used worksheet ribbon definition data range to input the various criteria needed to define tabs, groups and buttons. Wrote code to generate xml file needed. A lot of work here to learn what to do then hack other's code shared code.

I think I'm close... Below is the xml that my code generates based on entries in the worksheet ribbon definition data range. What might be wrong here? Nothing happens when the file is saved. I confirmed that the file is where it should be. That is, I confirmed that the following exists, is being overwritten by my code.

file:///C:/Users/UserName/AppData/Local/Microsoft/Office/Excel.officeUI

XML:
<mso:customUI xmlns:mso='http://schemas.microsoft.com/office/2009/07/customui'>
  <mso:ribbon>
   <mso:qat/>
    <mso:tabs>
      <mso:tab id='tab1' label='Test Ribbon' insertBeforeQ='mso:TabFormat'>

         <mso:group id='group1' label='Sorting' autoScale='true'>
           <mso:button id='G1Button1' label='Sort Symbol' imageMso='FileSave 'onAction='ButtonG1_1'/>
           <mso:button id='G1Button2' label='Sort Quantity' imageMso='PivotTableBlankRowsRemove 'onAction='ButtonG1_2'/>
           <mso:button id='G1Button3' label='Sort Value' imageMso='ControlLayoutRemove 'onAction='ButtonG1_3'/>
           <mso:button id='G1Button4' label='Sort Accounts' imageMso='ImportExcel 'onAction='ButtonG1_4'/>
        </mso:group>

         <mso:group id='group2' label='Clear Data' autoScale='true'>
           <mso:button id='G2Button1' label='One Fund' imageMso='PivotTableBlankRowsRemove 'onAction='ButtonG2_1'/>
           <mso:button id='G2Button2' label='All Funds' imageMso='ControlLayoutRemove 'onAction='ButtonG2_2'/>
        </mso:group>

         <mso:group id='group3' label='Utilities' autoScale='true'>
           <mso:button id='makeStickyNote' label='Sticky Note' imageMso='AppointmentColor6 'onAction='ButtonG3_1'/>
           <mso:button id='G3Button2' label='Clear Note' imageMso='AppointmentColor7 'onAction='ButtonG3_2'/>
           <mso:button id='G3Button3' label='Freeze Panes' imageMso='AppointmentColor8 'onAction='ButtonG3_3'/>
        </mso:group>

      </mso:tab>
    </mso:tabs>
  </mso:ribbon>
</mso:customUI>
 

Some videos you may like

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

OaklandJim

Board Regular
Joined
Nov 29, 2018
Messages
77
Office Version
  1. 2019
Platform
  1. Windows
As usual, I fiddled with xml formation -- I'm barely familiar with it -- and it seems that I can generate a ribbon tab with groups using code. I think that I had single quotes wrong, like with with a rogue space.

Now, I'm going to try to figure out how to do other control types. Seems a bit confusing, now anyway.

First though I want to be more familiar with images for the ribbon. MS file I found shows the entire list by name. Great but, I'd like to see the image too. I have another workbook that shows the images and I can see names if I hover over an image but is there a resource that shows both, ideally in a workbook?

Thnx again, Mr. EXCELent family.
 

Watch MrExcel Video

Forum statistics

Threads
1,127,063
Messages
5,622,470
Members
415,897
Latest member
Barry18180

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
Top