Jeffrey Smith
Well-known Member
- Joined
- Feb 11, 2005
- Messages
- 795
After several days of searching this site and many others, I Think I'm on my to understanding the basics of creating my own custom ribbon menu. I found the "CustomUIEditor" and Andy Pope's RibbonX Visual Designer. Both great tools.
I've created my menu. It has a new tab, two group, and some controls. My task is to load strings into one of the comboboxes from a list on a sheet. The id of the combobox is cmbo_ReachesCombo. I grabbed some code from Andy Pope's site that changes the text for a editbox. I tried to adapt it to my combobox, but it didn't work. Can anyone help with specific code for loading a combobox on the ribbon?
Jeff
This is the xml
I've created my menu. It has a new tab, two group, and some controls. My task is to load strings into one of the comboboxes from a list on a sheet. The id of the combobox is cmbo_ReachesCombo. I grabbed some code from Andy Pope's site that changes the text for a editbox. I tried to adapt it to my combobox, but it didn't work. Can anyone help with specific code for loading a combobox on the ribbon?
Jeff
This is the xml
Rich (BB code):
<CUSTOMUI target="_blank" customui? 01 2006 office schemas.microsoft.com http: xmlns="<a href="><HTTP: 01 2006 office schemas.microsoft.com A customui<><FONT color=#0000ff size=2><FONT color=#0000ff size=2><P><!--</FONT></FONT><FONT color=#008000 size=2><FONT color=#008000 size=2>RibbonX Visual Designer 1.7 for Microsoft Excel. XML Code produced on 2010/01/04</FONT></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>--></P><P><</FONT></FONT><FONT color=#800000 size=2><FONT color=#800000 size=2>customUI </FONT></FONT><FONT color=#ff0000 size=2><FONT color=#ff0000 size=2>xmlns</FONT></FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>=</FONT></FONT><FONT size=2>"http://schemas.microsoft.com/office/2006/01/customui" ></P><ribbon >
<tabs >
<tab
id="TSTab"
label="Time Series"
tag="TS">
<group
id="grpNavigate"
imageMso="UpgradeWorkbook"
label="Navigate"
tag="TS">
<comboBox
id="cmbo_ReachesCombo"
imageMso="DiagramReverseClassic"
label="Goto Reaches"
screentip="Select a Reach Page to Show"
tag="TS"
getText="cmbo_ReachesCombo_getText"
onChange="cmbo_ReachesCombo_onChange"/>
<button
id="btn_FlowSum"
imageMso="ReturnToTaskList"
label="Flow Summary"
screentip="Show the Flow Summary Page"
tag="TS"
onAction="btn_FlowSum_onAction"/>
<button
id="btn_SpeciesList"
imageMso="DatasheetNewField"
label="Species List"
screentip="Show the Species List Page"
tag="TS"
onAction="btn_SpeciesList_onAction"/>
</group >
<group
id="grpOptions"
imageMso="PageBreakInsertOrRemove"
label="Split Screen Options"
tag="TS">
<comboBox
id="cmbo_OptionList"
imageMso="DatasheetView"
label="Option List"
screentip="Choose an Option to Show"/>
<button
id="btn_OptionsOff"
imageMso="ErrorChecking"
label="Turn off Options"
screentip="Turn off"
onAction="btn_OptionsOff_onAction"/>
</group >
</tab >
</tabs >
</ribbon >
</customUI >
Rich (BB code):
Rich (BB code):
Rich (BB code):
Rich (BB code):
Rich (BB code):
Public Sub cmbo_ReachesCombo_getText(control As IRibbonControl, ByRef returnedVal)
'
' Code for getText callback. Ribbon control Reaches Combobox
'
Dim R As Range
Set R = Sheets("Options").Range(Range("ReachPagesHeader").Offset(1, 0), Range("ReachPagesHeader").Offset(20, 0).End(xlUp))
returnedVal = R.text
End Sub
Last edited: