PDA

View Full Version : Customize ribbon 2013 excel



talytech
10-14-2019, 08:23 AM
I would like to remove all menus from the ribbon except for the "Add on" menu. I dont want the user to have access to do anything besides what's under the add on menu. Can anyone tell me how to achieve that task?

Paul_Hossler
10-14-2019, 02:09 PM
You can add/edit the CustomUI.xml and make


<ribbon startFromScratch="true">

and then put things back

Here's a more complete example



<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">


<!-- Set startFromScratch to true to hide the Ribbon and QAT-->
<ribbon startFromScratch="true">


<!-- startFromScratch="true" hides all of the Ribbon tabs and it hide the QAT. -->
<!-- It not hides the Contextual tabs on the ribbon, for example the -->
<!-- Format tab that you see when you select a picture on your worksheet. -->
<!-- So if you want to hide them you must use the RibbonX below: -->


<contextualTabs>
<tabSet idMso="TabSetSmartArtTools" visible="false" />
<tabSet idMso="TabSetChartTools" visible="false" />
<tabSet idMso="TabSetDrawingTools" visible="false" />
<tabSet idMso="TabSetPictureTools" visible="false" />
<tabSet idMso="TabSetPivotTableTools" visible="false" />
<tabSet idMso="TabSetHeaderAndFooterTools" visible="false" />
<tabSet idMso="TabSetTableToolsExcel" visible="false" />
<tabSet idMso="TabSetPivotChartTools" visible="false" />
<tabSet idMso="TabSetInkTools" visible="false" />
</contextualTabs>




<!-- You can add xml here to create your own custom tab on the ribbon-->




</ribbon>
</customUI>

talytech
10-15-2019, 03:33 AM
Thanks Paul.
But does the above XML code go directly into a module? For example, do I create a function/sub and put the XML code in the function?

Paul_Hossler
10-15-2019, 07:46 AM
No, you need to use a CustomUI editor to add the XML to the XLSM but outside of Excel

https://www.rondebruin.nl/win/s2/win001.htm

I use the older version that RdB refers to, but the newer one sounds nicer



There is a Ribbon UI forum here if you want me to more this to there

http://www.vbaexpress.com/forum/forumdisplay.php?96-Office-2007-Ribbon-UI