(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
PHP Code:
<splitButton id="mySplitButton" getEnabled="get_enabled_mySplitButton" size="large">
(not sure whether the getenabled was necessary). Then I changed the code to
Code:
Public Const gRBX_SHB_SPLITBUTTON = "mySplitButton"
Public g_SHB_SPLITBUTTON_Enabled As Boolean
and on the activate of the sheet
Code:
g_SHB_SPLITBUTTON_Enabled = False
g_rbxIRibbonUI.InvalidateControl gRBX_SHB_SPLITBUTTON
g_SHB_button_Enabled = False
g_rbxIRibbonUI.InvalidateControl gRBX_SHB_BUTTON
as well as
Code:
'Callback for mySplitButton getEnabled
Sub get_enabled_mySplitButton(control As IRibbonControl, ByRef returnedVal)
MsgBox "In enabled_mySplitButton"
returnedVal = g_SHB_SPLITBUTTON_Enabled
End Sub
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
Bookmarks