Excel 2007 Ribbon

H

hitmonkong

Does anyone know if we can set a default value in the dropdown menu in a new
ribbon in Excel 2007 (like Arial is the default value for Fonts dropdown menu
in Excel 2003). I am having a hard time finding the code for it. I am
developing the ribbon in Office 2007 Custom UI Editor.

Thanks,
hitmonkong
 
E

ErNeu

Hi,

I'm also looking for that info...
can anyone pls post the syntax in the xml or send me the workbook,
pls?

many thanks in advance
eric

Hi again,

just found it - and for everyone who's looking this up - found it
here: http://word.mvps.org/FAQs/Customization/Customising the Ribbon - Advanced.htm

getSelectedItemIndex= has to be set...

sample:

<dropDown id="DD1" label="Run Macro"

getItemCount="RibbonControl.GetItemCount"

getItemLabel="RibbonControl.GetItemLabel"

getSelectedItemIndex="RibbonControl.GetSelectedItemIndex"
onAction="RibbonControl.MyDDMacro" />


'Callback DropDown GetSelectedIndex
Sub GetSelectedItemIndex(ByVal control As IRibbonControl, ByRef Index)
'This procedure is used to ensure the first item in the dropdown is
selected when the control is displayed
Index = 0
End Sub

kind regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top