Custom UI Editor Retrieve dropdown value

GRCArizona

Board Regular
Joined
Apr 24, 2010
Messages
95
Hi - I've been searching everywhere for a solution to this. The only thing I can find pertains to "Buttons" and getting a msgbox that says "Hello".

I've created a custom menu in Ribbon using a UI Editor. The drop down menu has the months "Jan" and "Feb". My drop down is populating correctly, but I'm looking for the VBA code to return the selected month back to an Excel worksheet - specifically a NamedRange called "Fiscal_Month". I'm using the correct procedure (below), b/c when I select a month from the dropdown, I'm getting the Msgbox, but the NamedRange is not updating. If anyone can provide what I'm missing, I'd really appreciate it.

thanks

Code:
Public Sub Dropdown1_getSelectedItemID(control As IRibbonControl, ByRef index)


Select Case control.ID
        Case "Jan"
            Range("Fiscal_Month").Value = "Jan"
        Case "Feb"
            Range("Fiscal_Month").Value = "Feb"
    End Select


MsgBox "You have updated the Fiscal Start Month"
End Sub
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Forum statistics

Threads
1,214,807
Messages
6,121,679
Members
449,047
Latest member
notmrdurden

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top