How can I access to my custom ribbon elements?
The elements are made in (.xlsm\customUI\customUI.xml)
<ribbon startFromScratch="false">
<tabs>
<tab idMso="TabHome">
<group id="MatrixGroup" label="xxx" insertBeforeMso="GroupClipboard">
<button id="b1" label="111" imageMso="DataFormSource" onAction="asas" />
<button id="b2" label="222" imageMso="ConditionalFormattingClearMenu" onAction="sasa" />
<dropDown id="Drop" label=" Env" sizeString="WWWWWWWWW">
<item id="Item1" label="1"/>
<item id="Item2" label="2"/>
<item id="Item3" label="3"/>
<item id="Item4" label="4"/>
</dropDown>
</group>
</tab>
</tabs>
</ribbon>
I need to get chosen dropDown element name/id when I click by button id="b1" so onAction="myMacro" for the dropDown element can not help here.
But anyway there is a code to get dropdown element id - maybe you can transform it to call this sub from another Sub (which is triggered by pressing button id="b1")
Sub GetS(control As IRibbonControl, id As String, index As Integer)
If control.id = "Drop" Then
MsgBox id
End If End Sub