Invalidate Excel 2013 ribbon combo box while the ribbon is minimized

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_Combo_OnChange(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.

 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.

Forum statistics

Threads
1,223,249
Messages
6,171,031
Members
452,374
Latest member
keccles

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