How to identify an item selected in Fluent RibbonX.DropDown control?

I have a customised excel ribbon that contains buttons and togglebuttons with call backs for getVisible, getEnabled, and getLabel,

.. but this is my first DropDown control, and I'm unsure how to get the selected DropDown.Item. I suspect I need to use getSelectedItemIndex, but am uncertain how.

SO FAR: the drop down items are displayed in the ribbon via this XML:
<group id="tabEngineer_gp4" label="Select XL Sheet or Sheets">
      <dropDown id="tabEngineerGp4c1" showLabel="true" label="Display of xl Sheets" > 
                  <item id="tabEngineerGp4c1Sheet_1" label="Hide all sheets" />
                  <item id="tabEngineerGp4c1Sheet_2" label="Show visEvent Sheet" />
                  <item id="tabEngineerGp4c1Sheet_3" label="Show another sheet" />

But, when I provide add an onAction reference to a macro:
      <dropDown id="tabEngineergp4c1" showLabel="true" label="Choose One Excel Sheet to display" onAction="macro_tabEngineerGp4c1">

.. and the macro reads:
Sub macro_tabEngineerGp4c1(control As IRibbonControl)
    MsgBox "hello: macro_tabEngineerGp4c1 = " & control.ID
End Sub

... I get this Error message box:
      "Wrong number of arguments or invalid property assignment"
      and even if I comment out the msgbox (which is just a 1st check that the macro is called).

I dont use visual Studio

Who is Participating?
Rory ArchibaldConnect With a Mentor Commented:
The signature for your callback is missing some arguments:

Sub macro_tabEngineerGp4c1(control As IRibbonControl,selectedId As String, selectedIndex As Integer)

Open in new window

Kelvin4Author Commented:
Thanks for your speedy response. I usually respond pretty fast.
I apologies that I could not, on this occasion, give a speedy acknowledgement.  
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.