So I just started playing with the CustomUI Ribbon Excel tool this morning.
My intent was to
1.) remove all menus from my VBA Project Workbook
2.) create a custom Drop Down Menu (Menu Items Stacked on top of each other and not individual buttons) with Menu Selections calling sub in Project Workbook
Example code I found accomplishes item #1 and the button clicks do call the Sub in VBA Module Object - however it depicts the Menu items as "buttons" and arranges them Horizontally in the MenuBar -
I'm sure it is the "Button" commands in the XML - but can't seem to find what I need to convert that to drop list with (what I believe is) On Select iTem
Any assistance in getting me in the right direction would be appreciated
XML Code currently looks like
#
customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
ribbon startFromScratch="true">
tabs>
tab id="Menu" label="SetBilder">
group id="SimpleControls" label="Menu Commands">
menu id="CTRl1"
label="Save Set As..."
onAction="ThisWorkbook.MyMacro"/>
button id="CTRl2"
label="Print Set - All Values"
onAction="ThisWorkbook.MyMacro"/>
separator id="mySeparator2" />
button id="CTRl3"
label="Print Set - No Cost"
onAction="ThisWorkbook.MyMacro"/>
separator id="mySeparator3" />
button id="CTRl4"
label="Import - Update Price Guide"
onAction="ThisWorkbook.MyMacro"/>
separator id="mySeparator4" />
button id="CTRl5"
label="Import - Update SetBilder Version"
onAction="ThisWorkbook.MyMacro"/>
separator id="mySeparator5" />
/group>
/tab>
/tabs>
/ribbon>
/customUI>
#
My intent was to
1.) remove all menus from my VBA Project Workbook
2.) create a custom Drop Down Menu (Menu Items Stacked on top of each other and not individual buttons) with Menu Selections calling sub in Project Workbook
Example code I found accomplishes item #1 and the button clicks do call the Sub in VBA Module Object - however it depicts the Menu items as "buttons" and arranges them Horizontally in the MenuBar -
I'm sure it is the "Button" commands in the XML - but can't seem to find what I need to convert that to drop list with (what I believe is) On Select iTem
Any assistance in getting me in the right direction would be appreciated
XML Code currently looks like
#
customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
ribbon startFromScratch="true">
tabs>
tab id="Menu" label="SetBilder">
group id="SimpleControls" label="Menu Commands">
menu id="CTRl1"
label="Save Set As..."
onAction="ThisWorkbook.MyMacro"/>
button id="CTRl2"
label="Print Set - All Values"
onAction="ThisWorkbook.MyMacro"/>
separator id="mySeparator2" />
button id="CTRl3"
label="Print Set - No Cost"
onAction="ThisWorkbook.MyMacro"/>
separator id="mySeparator3" />
button id="CTRl4"
label="Import - Update Price Guide"
onAction="ThisWorkbook.MyMacro"/>
separator id="mySeparator4" />
button id="CTRl5"
label="Import - Update SetBilder Version"
onAction="ThisWorkbook.MyMacro"/>
separator id="mySeparator5" />
/group>
/tab>
/tabs>
/ribbon>
/customUI>
#
HTML:
<customui xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<ribbon startfromscratch="true">
<tabs> <tab id="Menu" label="SetBilder"><group id="SimpleControls" label="Menu Commands"><customui xmlns="http://schemas.microsoft.com/office/2009/07/customui">
<ribbon startfromscratch="true">
<tabs>
<tab id="Menu" label="SetBilder">
<group id="SimpleControls" label="Menu Commands"> </group></tab></tabs></ribbon></customui></group></tab></tabs></ribbon></customui><customui xmlns="http://schemas.microsoft.com/office/2009/07/customui"><ribbon startfromscratch="true"><tabs><tab id="Menu" label="SetBilder"><group id="SimpleControls" label="Menu Commands"><customui xmlns="http://schemas.microsoft.com/office/2009/07/customui"><ribbon startfromscratch="true"><tabs><tab id="Menu" label="SetBilder"><group id="SimpleControls" label="Menu Commands"><menu id="CTRl1"
</menu></group></tab></tabs></ribbon></customui></group></tab></tabs></ribbon></customui>
Last edited by a moderator: