(I'm aware of the fact that the slightest error in one's ribbon code results in nothing happening rather than an error). I changed the UI code to be
(not sure whether the getenabled was necessary). Then I changed the code to
<splitButton id="mySplitButton" getEnabled="get_enabled_mySplitButton" size="large">
and on the activate of the sheet
Public Const gRBX_SHB_SPLITBUTTON = "mySplitButton"
Public g_SHB_SPLITBUTTON_Enabled As Boolean
as well as
g_SHB_SPLITBUTTON_Enabled = False
g_SHB_button_Enabled = False
but I was still able to open the ID SHB_Menu (the button itself was disabled) and see/run the macros Run_button_1/2. Nor did I ever hit the MSGBOX in get_enabled_mySplitButton
'Callback for mySplitButton getEnabled
Sub get_enabled_mySplitButton(control As IRibbonControl, ByRef returnedVal)
MsgBox "In enabled_mySplitButton"
returnedVal = g_SHB_SPLITBUTTON_Enabled