santosh_2809
New Member
- Joined
- Oct 30, 2012
- Messages
- 3
I've a custom combo box in my custom tab (Excel 2013) & I want to set a default value for it. Whenever I select any option from the dropdown, it should run a specific macro according to selection & again set the default value. I've tried the RibbonUI.InvalidateControl (control.ID), but it is not working when the ribbon is minimized. The macro runs after selection changes, but the combo box will not be set the default value. When the ribbon is maximized it's working fine & setting the default value once the macro runs. Below is the code.
Sub rxcmb_Test_CombnChange(control As IRibbonControl, text As String)
Run text
rxRibbonUI.InvalidateControl (control.ID)
End Sub
where the text holds the combo box selection & also the name of my macro.
I've tried to maximize the ribbon with this command CommandBars.ExecuteMso "MinimizeRibbon", before invalidating the combo box. The ribbon gets maximized but the combobox will not show the default value.
Any help to solve this issue would be greatly appreciated. Thanks in advance.
Sub rxcmb_Test_CombnChange(control As IRibbonControl, text As String)
Run text
rxRibbonUI.InvalidateControl (control.ID)
End Sub
where the text holds the combo box selection & also the name of my macro.
I've tried to maximize the ribbon with this command CommandBars.ExecuteMso "MinimizeRibbon", before invalidating the combo box. The ribbon gets maximized but the combobox will not show the default value.
Any help to solve this issue would be greatly appreciated. Thanks in advance.