If a Shared Excel Workbook with a Custom Ribbon (RibbonX) has been previously saved while the window is in MAXIMISED and then opened again while the Excel Window is NORMAL (not Maximised) then you will get an error:
'Cannot run the macro 'xxxx_OnLoad'. The macro may not be available in this workbook or all macros may be disabled.
You can re-create a workbook by using this basic RibbonX code:
<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="rxcustomUI_onLoad">
<ribbon>
<tabs>
<tab id="tabCutol" label="TEST SHARED WB" >
<group id="gpData" label="Data" centerVertically="true">
<button id="btTest" label="Hello World" onAction="btTest_OnAction" imageMso="ImportMoreMenu" size= "large"/>
</group>
</tab>
</tabs>
</ribbon>
</customUI>
Followed by the VBA code in the workbook:
Public CutolDOCRibbon As IRibbonUI
Sub rxcustomUI_onLoad(ribbon As IRibbonUI)
Set CutolDOCRibbon = ribbon
End Sub
Sub btTest_OnAction(ByRef control As IRibbonControl)
MsgBox "Houston, we have a problem!"
End Sub
Simply save the workbook and use the Share Workbook option and you'll be able to replicate.
Any advice or insight would be welcome.
Kind Regards
Steve