Custom Ribbon:

pedie

Well-known Member
Joined
Apr 28, 2010
Messages
3,875
Hi if i have XML code, how can I use it to build/modify my ribbon...:)

Thanks for helping.

Current XML
Code:
[/FONT]
[URL="file:///E:/Personal%20Files/eBooks/customUI.xml#"][B][FONT=Courier New][COLOR=#ff0000]-[/COLOR][/FONT][/B][/URL][FONT=Courier New] [COLOR=#0000ff]<[/COLOR][COLOR=#990000]customUI[/COLOR][COLOR=#ff0000] xmlns[/COLOR][COLOR=#0000ff]="[/COLOR][B][COLOR=#ff0000]http://schemas.microsoft.com/office/2006/01/customui[/COLOR][/B][COLOR=#0000ff]">[/COLOR][/FONT]
[URL="file:///E:/Personal%20Files/eBooks/customUI.xml#"][B][FONT=Courier New][COLOR=#ff0000]-[/COLOR][/FONT][/B][/URL][FONT=Courier New] [COLOR=#0000ff]<[/COLOR][COLOR=#990000]ribbon startFromScratch[/COLOR][COLOR=#0000ff]="[/COLOR][B]true[/B][COLOR=#0000ff]">[/COLOR][/FONT]
[URL="file:///E:/Personal%20Files/eBooks/customUI.xml#"][B][FONT=Courier New][COLOR=#ff0000]-[/COLOR][/FONT][/B][/URL][FONT=Courier New] [COLOR=#0000ff]<[/COLOR][COLOR=#990000]tabs[/COLOR][COLOR=#0000ff]>[/COLOR][/FONT]
[URL="file:///E:/Personal%20Files/eBooks/customUI.xml#"][B][FONT=Courier New][COLOR=#ff0000]-[/COLOR][/FONT][/B][/URL][FONT=Courier New] [COLOR=#0000ff]<[/COLOR][COLOR=#990000]tab id[/COLOR][COLOR=#0000ff]="[/COLOR][B]Tab5[/B][COLOR=#0000ff]"[/COLOR][COLOR=#990000] label[/COLOR][COLOR=#0000ff]="[/COLOR][B]Mytab1[/B][COLOR=#0000ff]">[/COLOR][/FONT]
[URL="file:///E:/Personal%20Files/eBooks/customUI.xml#"][B][FONT=Courier New][COLOR=#ff0000]-[/COLOR][/FONT][/B][/URL][FONT=Courier New] [COLOR=#0000ff]<[/COLOR][COLOR=#990000]group id[/COLOR][COLOR=#0000ff]="[/COLOR][B]Group5[/B][COLOR=#0000ff]"[/COLOR][COLOR=#990000] label[/COLOR][COLOR=#0000ff]="[/COLOR][B]Clock[/B][COLOR=#0000ff]">[/COLOR][/FONT]
[FONT=Courier New][B][COLOR=#ff0000] [/COLOR][/B] [COLOR=#0000ff]<[/COLOR][COLOR=#990000]button[/COLOR] [COLOR=#990000]id[/COLOR][COLOR=#0000ff]="[/COLOR][B]Button5[/B][COLOR=#0000ff]"[/COLOR][COLOR=#990000] label[/COLOR][COLOR=#0000ff]="[/COLOR][B]Clock[/B][COLOR=#0000ff]"[/COLOR][COLOR=#990000] size[/COLOR][COLOR=#0000ff]="[/COLOR][B]large[/B][COLOR=#0000ff]"[/COLOR][COLOR=#990000] onAction[/COLOR][COLOR=#0000ff]="[/COLOR][B]Custom_Btn_Macro1[/B][COLOR=#0000ff]"[/COLOR][COLOR=#990000] imageMso[/COLOR][COLOR=#0000ff]="[/COLOR][B]MsnLogo[/B][COLOR=#0000ff]" />[/COLOR] [/FONT]

[FONT=Courier New][B][COLOR=#ff0000] [/COLOR][/B] [COLOR=#0000ff]</[/COLOR][COLOR=#990000]group[/COLOR][COLOR=#0000ff]>[/COLOR][/FONT]


[FONT=Courier New][B][COLOR=#ff0000] [/COLOR][/B] [COLOR=#0000ff]</[/COLOR][COLOR=#990000]tab[/COLOR][COLOR=#0000ff]>[/COLOR][/FONT]


[URL="file:///E:/Personal%20Files/eBooks/customUI.xml#"][B][FONT=Courier New][COLOR=#ff0000]-[/COLOR][/FONT][/B][/URL][FONT=Courier New] [COLOR=#0000ff]<[/COLOR][COLOR=#990000]tab id[/COLOR][COLOR=#0000ff]="[/COLOR][B]Tab6[/B][COLOR=#0000ff]"[/COLOR][COLOR=#990000] label[/COLOR][COLOR=#0000ff]="[/COLOR][B]MyTab2[/B][COLOR=#0000ff]">[/COLOR][/FONT]
[URL="file:///E:/Personal%20Files/eBooks/customUI.xml#"][B][FONT=Courier New][COLOR=#ff0000]-[/COLOR][/FONT][/B][/URL][FONT=Courier New] [COLOR=#0000ff]<[/COLOR][COLOR=#990000]group id[/COLOR][COLOR=#0000ff]="[/COLOR][B]Group6[/B][COLOR=#0000ff]"[/COLOR][COLOR=#990000] label[/COLOR][COLOR=#0000ff]="[/COLOR][B]Hi[/B][COLOR=#0000ff]">[/COLOR][/FONT]
[FONT=Courier New][B][COLOR=#ff0000] [/COLOR][/B] [COLOR=#0000ff]<[/COLOR][COLOR=#990000]button[/COLOR] [COLOR=#990000]id[/COLOR][COLOR=#0000ff]="[/COLOR][B]Button6[/B][COLOR=#0000ff]"[/COLOR][COLOR=#990000] label[/COLOR][COLOR=#0000ff]="[/COLOR][B]Hi[/B][COLOR=#0000ff]"[/COLOR][COLOR=#990000] size[/COLOR][COLOR=#0000ff]="[/COLOR][B]large[/B][COLOR=#0000ff]"[/COLOR][COLOR=#990000] onAction[/COLOR][COLOR=#0000ff]="[/COLOR][B]Custom_Btn_Macro2[/B][COLOR=#0000ff]"[/COLOR][COLOR=#990000] imageMso[/COLOR][COLOR=#0000ff]="[/COLOR][B]CustomActionsMenu[/B][COLOR=#0000ff]" />[/COLOR] [/FONT]

[FONT=Courier New][B][COLOR=#ff0000] [/COLOR][/B] [COLOR=#0000ff]</[/COLOR][COLOR=#990000]group[/COLOR][COLOR=#0000ff]>[/COLOR][/FONT]


[FONT=Courier New][B][COLOR=#ff0000] [/COLOR][/B] [COLOR=#0000ff]</[/COLOR][COLOR=#990000]tab[/COLOR][COLOR=#0000ff]>[/COLOR][/FONT]


[URL="file:///E:/Personal%20Files/eBooks/customUI.xml#"][B][FONT=Courier New][COLOR=#ff0000]-[/COLOR][/FONT][/B][/URL][FONT=Courier New] [COLOR=#0000ff]<[/COLOR][COLOR=#990000]tab id[/COLOR][COLOR=#0000ff]="[/COLOR][B]Tab7[/B][COLOR=#0000ff]"[/COLOR][COLOR=#990000] label[/COLOR][COLOR=#0000ff]="[/COLOR][B]MyTab3[/B][COLOR=#0000ff]">[/COLOR][/FONT]
[URL="file:///E:/Personal%20Files/eBooks/customUI.xml#"][B][FONT=Courier New][COLOR=#ff0000]-[/COLOR][/FONT][/B][/URL][FONT=Courier New] [COLOR=#0000ff]<[/COLOR][COLOR=#990000]group id[/COLOR][COLOR=#0000ff]="[/COLOR][B]Group7[/B][COLOR=#0000ff]"[/COLOR][COLOR=#990000] label[/COLOR][COLOR=#0000ff]="[/COLOR][B]Why[/B][COLOR=#0000ff]">[/COLOR][/FONT]
[FONT=Courier New][B][COLOR=#ff0000] [/COLOR][/B] [COLOR=#0000ff]<[/COLOR][COLOR=#990000]button[/COLOR] [COLOR=#990000]id[/COLOR][COLOR=#0000ff]="[/COLOR][B]Button7[/B][COLOR=#0000ff]"[/COLOR][COLOR=#990000] label[/COLOR][COLOR=#0000ff]="[/COLOR][B]Why[/B][COLOR=#0000ff]"[/COLOR][COLOR=#990000] size[/COLOR][COLOR=#0000ff]="[/COLOR][B]large[/B][COLOR=#0000ff]"[/COLOR][COLOR=#990000] onAction[/COLOR][COLOR=#0000ff]="[/COLOR][B]Custom_Btn_Macro3[/B][COLOR=#0000ff]"[/COLOR][COLOR=#990000] imageMso[/COLOR][COLOR=#0000ff]="[/COLOR][B]ActionInsert[/B][COLOR=#0000ff]" />[/COLOR] [/FONT]

[FONT=Courier New][B][COLOR=#ff0000] [/COLOR][/B] [COLOR=#0000ff]</[/COLOR][COLOR=#990000]group[/COLOR][COLOR=#0000ff]>[/COLOR][/FONT]


[FONT=Courier New][B][COLOR=#ff0000] [/COLOR][/B] [COLOR=#0000ff]</[/COLOR][COLOR=#990000]tab[/COLOR][COLOR=#0000ff]>[/COLOR][/FONT]


[FONT=Courier New][B][COLOR=#ff0000] [/COLOR][/B] [COLOR=#0000ff]</[/COLOR][COLOR=#990000]tabs[/COLOR][COLOR=#0000ff]>[/COLOR][/FONT]


[FONT=Courier New][B][COLOR=#ff0000] [/COLOR][/B] [COLOR=#0000ff]</[/COLOR][COLOR=#990000]ribbon[/COLOR][COLOR=#0000ff]>[/COLOR][/FONT]



[FONT=Courier New]
 
S M C...! thanks again.. i've this link.
But i want to know how to build one and not the actual tool:)

I want to know where to place this code that the ribbon will change...


Thanks again
 
Last edited:
Upvote 0

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
pedie, I am not sure what you are asking. You want to build a ribbon is what I understand, and for that, you can either edit the customUI.xml file manually (which I find painfull) or use the editor.

If you want to know anything specific, let me know. Alternatively, you could also post your queries at ExcelFox where they have a section for ribbons.
 
Upvote 0
Thanks. Okay just one specific thing i'm looking for here...
I want all the excel ribbon tab hiden and create new one with three clickable button with label "Update","Delete","Close"..


Thanks again.
'm checking ExcelFox too:)


pedie, I am not sure what you are asking. You want to build a ribbon is what I understand, and for that, you can either edit the customUI.xml file manually (which I find painfull) or use the editor.

If you want to know anything specific, let me know. Alternatively, you could also post your queries at ExcelFox where they have a section for ribbons.

 
Upvote 0
HTML:
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui"> 
<ribbon startFromScratch="true"> 
<tabs>
<tab id="Tab5" label="Mytab1"> 
<group id="myGroup" label="Group">
<button id="Button5" label="Update" size="large" onAction="Custom_Btn_Macro1" imageMso="MsnLogo"/>
<button id="Button6" label="Delete" size="large" onAction="Custom_Btn_Macro2" imageMso="CustomActionsMenu" /> 
<button id="Button7" label="Close" size="large" onAction="Custom_Btn_Macro3" imageMso="ActionInsert" /> 
</group>
</tab>
</tabs>
</ribbon>
</customUI>

That should do the ribbon part. And you can use the vba callbacks that I had posted in the beginning.
 
Upvote 0
Where do i exactly place this html code?
Sorry for troubling you but please keep in mind i have no idea how this works honestly...:)
 
Upvote 0
pedie, this is not an html code. It is an XML code. I just used the html code tags for readability.

anyway, if you install the custom ui editor, you'll be able to open your excel file, and in the code window, paste the xml code, and save and close. now open the same excel file, and insert a module to its vbaproject, and paste the vba callback routines that i had posted previously. Your new ribbon should now work (as per my post, each button will display a message box) and you can modify the macro to do what you would like it to do.
 
Upvote 0
SMC, thanks again...
'll try it and come back with questions if any...

Thanks again....

Pedie
pedie, this is not an html code. It is an XML code. I just used the html code tags for readability.

anyway, if you install the custom ui editor, you'll be able to open your excel file, and in the code window, paste the xml code, and save and close. now open the same excel file, and insert a module to its vbaproject, and paste the vba callback routines that i had posted previously. Your new ribbon should now work (as per my post, each button will display a message box) and youcan modify the macro to do what you would like it to do.
 
Upvote 0
Hi Pedie,

Try to follow these steps:

1. Download ZIP archive DataPig Custom Button Builder for Excel 2007

2. Unzip and load to Excel 2007 Custom_UI_Builder.xlsm from that archive.

3. Set up data in Custom_UI_Builder.xlsm as follows:
Excel Workbook
ABDEFGHI
1DataPig Custom Button Builder for Excel 2007www.datapigtechnologies.com
2
3
4Tab to UseTab NameGroup NameButton LabelButton SizeButton Image
5My Own Custom TabPedieActionUpdatelargeFieldsUpdate
6My Own Custom TabPedieActionCreatelargeFileNew
7My Own Custom TabPedieActionCloselargeCancelRequest
Sheet


4. Press button "Output Now"

5. Set on checkboxes "Hide all Excel tabs" and "Apply my custom UI to a new workbook"

6. Press "Go" button

7. Load the created workbook CustomUI Output.xlsm mentioned in pop-up message.

8. Press Alt-F11 and customize the macros for the buttons of your tabs in the Ribbon

You can download the already prepared file CustomUI Output.xlsm

Regards
 
Upvote 0

Forum statistics

Threads
1,225,149
Messages
6,183,185
Members
453,151
Latest member
Lizamaison

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