VBA excel dropDown customUI trouble

Copper Contributor

 

 

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

3 Replies

@666_666666 

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.

That's not gonna work.
I don't quite understand how it should look like:
Or[
("control.TabDeveloperExcel")
"control.TabDeveloperExcel"
("TabDeveloperExcel")
"TabDeveloperExcel"
/]
That's not gonna work.