Guys
I added 2 dropdown controls on my custom ribbon.
DropDownCategory (dynamic)
DropDownSubCategory (dynamic)
Dynamic means that the list can increase as soon a new item is added.
I would like to create just one callback function to populate these 2 dropdowns.
I'm using getItemLabel="PopulateDropDown" for both in the xml syntax.
I tried the following code for my callback function but without success because it is only populating the first CASE of my SELECT CASE.
Can someone advise me please?
I added 2 dropdown controls on my custom ribbon.
DropDownCategory (dynamic)
DropDownSubCategory (dynamic)
Dynamic means that the list can increase as soon a new item is added.
I would like to create just one callback function to populate these 2 dropdowns.
I'm using getItemLabel="PopulateDropDown" for both in the xml syntax.
I tried the following code for my callback function but without success because it is only populating the first CASE of my SELECT CASE.
Can someone advise me please?
VBA Code:
Sub PopulateDropDown(control As IRibbonControl, index As Integer, ByRef label)
Dim ActiveCategory As Variant
Dim ActiveSUBCategory As Variant
ActiveCategory = GetCategories()
ActiveSubCategory = GetSUBCategories()
Select Case control.ID
Case "DropDownCategory "
label = ActiveCategory (index)
Case "DropDownSubCategory "
label = ActiveSUBCategory (index) + 1
End Select
End Sub