May 27 2023 12:42 PM
SelectedIndex = None
InvalidateControl
this "code" deactivates the item in the dropdownlist
, but there is no redrawing (the list item is not active, but is displayed) #according to the manual, invalidate should initiate redrawing
if I switch to another tab with my hands and return to a custom tab,
the element is not displayed (this is the result I need)
please tell me how I can force excel 2016 to redraw the ribbon or switch to another tab
May 27 2023 11:44 PM
Here is an example of VBA code that makes a custom tab the active tab using the ActivateTab method of the IRibbonUI object:
Public myRibbon As IRibbonUI
Sub tabActivate(ByVal control As IRibbonControl)
myRibbon.ActivateTab(control.ID)
End Sub
untested.
May 29 2023 02:56 AM