CustomUI xml Windows 11

drag1c

Board Regular
Joined
Aug 7, 2019
Messages
110
Office Version
  1. 2016
  2. 2013
Platform
  1. Windows
Hi,

I've been using Windows 10, MS Excel 2016 32-bit with this code:

XML:
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<ribbon startFromScratch="true">
<qat>
<sharedControls>
<button idMso="FileSave" visible="false" />
<button idMso="Cut" visible="false" />
<button idMso="Copy" visible="false" />
<button idMso="Paste" visible="false" />
<button idMso="FileOpen" visible="false" />
<button idMso="GroupPrintPreviewPrint" visible ="false" />
<button idMso="GroupInsertChartsExcel" visible ="false" />
</sharedControls>
</qat>
<tabs>
<tab id="CustomTab" label="SCM Software">
<group id="CustomGroup1" label="SCM Program">
<button id="btn1" size="large" label="Main Menu" imageMso="DataOptionsMenu" onAction="CheckVersionAndShowForm" />
<button id="btn2" size="large" label="SCM Overview" imageMso="ProjectManageDependenciesOnDeliverables" onAction="CheckVersionAndRunSCMOverview" />
<button id="btn3" size="large" label="Search Product" imageMso="SearchUI" onAction="ServiceProductSearch" />
<button id="btn4" size="large" label="PC/FC Export" imageMso= "TableExportTableToSharePointList" onAction= "OpenExportMenu" />
</group>
<group id="CustomGroup3" label="Task Force">
<button id="btn5" size="large" label="Task Force" imageMso="FileWorkflowTasks" onAction="CheckVersionAndRunExport" getVisible="GetButtonVisibility" />
<button id="btn6" size="large" label="BFD Save" imageMso="TableInsert" onAction="InsertTrendData" getVisible="GetButtonVisibility" />
</group>
<group id="CustomGroup4" label="About">
<button id="btn7" size="large" label="Version" imageMso="SourceControlGetLatestVersion" onAction="CheckSoftwareVersion" />
</group>
<group id="FilterGroup" label="Sort Data" getVisible="GetButtonVisibility">
<button id="SortAscending" label="ASC Sort" imageMso="SortAscendingExcel" onAction="SortAscending" />
<button id="SortDescending" label="DESC Sort" imageMso="SortDescendingExcel" onAction="SortDescending" />
</group>
</tab>
</tabs>
<contextualTabs>
<tabSet idMso="TabSetTableToolsExcel">
<tab idMso="TabTableToolsDesignExcel" visible="false"/>
</tabSet>
</contextualTabs>
</ribbon>
<backstage>
<button idMso="FileSave" visible="false"/>
<button idMso="FileSaveAs" visible="false"/>
<button idMso="FileOpen" visible="false"/>
<button idMso="FileClose" visible="false"/>
<button idMso="ApplicationOptionsDialog" visible="false"/>
<button idMso="FileExit" visible="false"/>
<button idMso="HistoryTab" visible="false"/>
<button idMso="OfficeFeedback" visible="false"/>
<button idMso="ShareDocument" visible="false"/>

<tab idMso="TabInfo" visible="false"/>
    <tab idMso="TabRecent" visible="false"/>
    <tab idMso="TabNew" visible="false"/>
    <tab idMso="TabPrint" visible="false"/>
    <tab idMso="TabShare" visible="false"/>
    <tab idMso="TabHelp" visible="false"/>
    <tab idMso="TabPublish" visible="false"/>
    <tab idMso="TabSave" visible="false"/>
    <tab idMso="TabOfficeStart" visible="false"/>
    <tab idMso="Publish2Tab" visible="false"/>
    <tab idMso="TabOfficeFeedback" visible="false"/>
    <tab idMso="PlaceTabHome" visible="false"/>
</backstage>
</customUI>

This is .rels file:

XML:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">
    <Relationship Id="rId3"
                  Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties"
                  Target="docProps/app.xml"/>
    <Relationship Id="someID"
                  Type="http://schemas.microsoft.com/office/2007/relationships/ui/extensibility"
                  Target="customUI/customUI.xml"/>
    <Relationship Id="rId2"
                  Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties"
                  Target="docProps/core.xml"/>
    <Relationship Id="rId1"
                  Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument"
                  Target="xl/workbook.bin"/>
    <Relationship Id="rId4"
                  Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/custom-properties"
                  Target="docProps/custom.xml"/>
</Relationships>

Those codes were working perfect in Windows 10, but in Windows 11 they doesn't work. I use the same Excel 2016 32-bit.
Is there something I'm doing wrong?
 
How are you using it ?
And what "doesn't work" means?
 
Upvote 0
How are you using it ?
And what "doesn't work" means?
I've been using it by manual import of customUI folder with customUI.xml into excel through modification of xlsb extension into zip extension. It's visible in the code of .rels how it's called, as Target in SomeID.
It was working just fine in Windows 10.

In Windows 11, with the same file it doesn't work.

What I mean is there is no custom ribbon. It's standardized Excel ribbon visible.
 
Upvote 0
A suggestion: There's a tool for exactly this purpose here: Office RibbonX Editor. Quite useful IMO. And with added benefits.

I guess you are importing it in Personal.xlsb. Are you sure the Personal.xlsb is loaded? Can you confirm it.
Check if the file is in the correct location.
Try to load it manually and see if the UI is working.
Check if Personal.xlsb is not blocked (in the file properties).
Since you have a new system setup - check the TrustCenter settings.
 
Upvote 0
A suggestion: There's a tool for exactly this purpose here: Office RibbonX Editor. Quite useful IMO. And with added benefits.

I guess you are importing it in Personal.xlsb. Are you sure the Personal.xlsb is loaded? Can you confirm it.
Check if the file is in the correct location.
Try to load it manually and see if the UI is working.
Check if Personal.xlsb is not blocked (in the file properties).
Since you have a new system setup - check the TrustCenter settings.
Unfortunately I can't use external software on company PC. I literally have to find a way to do it manually.

In past, I would simply double click on my xlsb file and it would load customUI ribbon in excel file with data I provided.
I've tested macroes in .xlsb file - they all work properly but only XLM code is not loaded.
 
Upvote 0
Try checking this option see if anything pops up during loading the xlsb.
File -> Options -> Advanced -> General -> "Show add-in user interface errors"

I just tested it (imported it with ribbonX editor) and it generally worked:
- some errors for non-existing macros which is OK​
- an error on line 10 ( i think ) for calling a group control as a button​
However, it cleared the Ribbon and showed your controls.

So, the other thing is in the .rels file and the customUI.xml:
- the customUI should be called customUI14.xml (customUI is for office 2007)​
- <Relationship Id="Re3cb7231a289462e" Type="http://schemas.microsoft.com/office/2007/relationships/ui/extensibility" Target="customUI/customUI14.xml"/>​
maybe the id should start with an R and have no spaces​
and the target should be "customUI/customUI14.xml"​
But to be on the safe side - use the Office RibbonX Editon - you can run it from a USB stick , or you take the xlsb file home and sorti out on you personal computer and then bring it back to work. There are many ways to do it. That's what I did and it worked first time.
 
Upvote 0
Try checking this option see if anything pops up during loading the xlsb.
File -> Options -> Advanced -> General -> "Show add-in user interface errors"

I just tested it (imported it with ribbonX editor) and it generally worked:
- some errors for non-existing macros which is OK​
- an error on line 10 ( i think ) for calling a group control as a button​
However, it cleared the Ribbon and showed your controls.

So, the other thing is in the .rels file and the customUI.xml:
- the customUI should be called customUI14.xml (customUI is for office 2007)​
- <Relationship Id="Re3cb7231a289462e" Type="http://schemas.microsoft.com/office/2007/relationships/ui/extensibility" Target="customUI/customUI14.xml"/>​
maybe the id should start with an R and have no spaces​
and the target should be "customUI/customUI14.xml"​
But to be on the safe side - use the Office RibbonX Editon - you can run it from a USB stick , or you take the xlsb file home and sorti out on you personal computer and then bring it back to work. There are many ways to do it. That's what I did and it worked first time.
With my code provided and with "Show add-in user interface errors", this is message:
1743092856059.png


Seems policy is blocking it. Is there way around with customUI14 or simply that also will not work if policy doesn't approve it?
 
Upvote 0
Oops, I hate these.
Well, if you don't have admin access (most likely) you may have to ask a/the admin to make the necessary adjustments.
Good luck with that.
 
Upvote 0

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