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" />
         </dropDown>
</group>

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 = " & 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

Thanks,
Kelvin4
Kelvin4Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Rory ArchibaldCommented:
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

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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.  
Kelvin
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.