johnjacobt
New Member
- Joined
- Nov 29, 2011
- Messages
- 3
Hi All,
I'm relatively new to the CustomUI stuff. Today I created a custom Tab in Ribbon with a button and a dropDown (in Excel 2010). The XML looks like below -
What I want to achieve is to write some code in Macro1 that will populate values One, Two, Three in the dropDown when Button1 is clicked. That means when the xlsm file is opened dropDown would be empty. It will be populated with values only when button is clicked.
Can any of you write a code snippet to get this done?
If any changes should be made to the XML (like adding callback actions) I have posted above please do so as well.
Thanks in advance. Eagerly waiting for the answer.
- johnjacobt
I'm relatively new to the CustomUI stuff. Today I created a custom Tab in Ribbon with a button and a dropDown (in Excel 2010). The XML looks like below -
PHP:
<customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
<ribbon>
<tabs>
<tab id="MyTab" label="MyTab" insertBeforeMso="TabHome">
<group id="Group1" label="My Group">
<button id="Button1" label="Click Me" size="large" onAction="Macro1" />
<dropDown id="dropDown1" label="Drop Down" />
</group>
</tab>
</tabs>
</ribbon>
</customUI>
What I want to achieve is to write some code in Macro1 that will populate values One, Two, Three in the dropDown when Button1 is clicked. That means when the xlsm file is opened dropDown would be empty. It will be populated with values only when button is clicked.
Can any of you write a code snippet to get this done?
If any changes should be made to the XML (like adding callback actions) I have posted above please do so as well.
Thanks in advance. Eagerly waiting for the answer.
- johnjacobt