PDA

View Full Version : Sleeper: Ribbon Menu



Thompyt
04-26-2023, 06:25 PM
I am using the below to put Icons/Command Buttons on the Excel ribbon. I would like to group the selections into 3 groups vice 1 large one. If I change any code below it will not load. I was thinking that three groups had to do with the "mso:group id='HBGroup'" part of the code and I would change the name of this to start a new group. I wanted to separate the groups by a vertical bar.

30749

Does anyone have an idea to accomplish this?

Too new to post the code evidently. Below is a pic of the code:

30751

Thanks
Thompyt

Aussiebear
04-27-2023, 12:26 AM
Welcome to VBAX forum Thompyt. Bettersolutions dot com has the following example. Maybe this can give you a heads up.



<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<ribbon startFromScratch="true">
<tabs>
<tab id="CustomTab" label="My Tab">
<group id="Group1" label="Group 1">
<button id="button1"
imageMso="ErrorChecking"/>
<separator id="Seperator1"/>
<button id="button2"
label="Some Text"
imageMso="LeaveReader"/>
<separator id="Seperator2"/>
<button id="button3"
imageMso="OutlookTaskCreate"/>
</group>
</tab>
</tabs>
</ribbon>
</customUI>

Thompyt
04-27-2023, 05:40 PM
Thank you I'll give it a shot

arnelgp
04-27-2023, 06:30 PM
see also Ron de Bruin ribbon examples:
Ribbon Examples files and Tips (rondebruin.nl) (https://www.rondebruin.nl/win/s2/win003.htm)

Paul_Hossler
04-28-2023, 08:47 AM
Just a thought

Looking at the screen shot, it appears that you're building the Custion XML on the fly each time the WB is activated.

Why? It'd be much easier and less complicated to just do it one time in the CustomXL of the WB