Refresh Excel CustomUI Ribbon drop down not on workbook open



I'm hoping someone has insight on this...I understand how to update an Excel CustomUI Ribbon dropdown to a default value based upon a cell...The below method works perfectly, but the below referenced cell "AX6" can get updated via a userform. I want the Ribbon drop down to refresh/update and reflect what is chosen in the userform (userform will only update cell "AX6" with values that reflect the drop down list in the XML code)...is there maybe a way to call the VB sub below and have the ribbon dropdown update? I can't seem to find a way to call a sub with "control As IRibbonControl" without it erroring out and I'm not sure if the declared variable in the sub statement throws another wrench into...any help on this would be greatly appreciated!!


XML:



<dropDown id="chooseFilter" showLabel="true" label="LOB" getSelectedItemID="GetSelectedItemID"
onAction="OnAction" tag="SkillDetail4" getEnabled="GetEnabledMacro">


VB:



Private mCurrentItemID As Variant
------------------------------------------------------------------------
Sub GetSelectedItemID(control As IRibbonControl, ByRef itemID As Variant)
If IsEmpty(mCurrentItemID) Then
mCurrentItemID = Worksheets("Skill Detail").Range("AX6").Value
End If
itemID = mCurrentItemID


End Sub


No comments:

Post a Comment