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
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