Stumped on the Fluent ribbon in Excel

Copper Contributor

I have the XML code for the ribbon starting:

<customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="R100Ribbon_onLoad" >

 

In a module in Excel I have the following VBA:

 

Option Explicit
Public R100Ribbon As IRibbonUI

 

 I then have the following subroutine:

 

Public Sub R100Ribbon_onLoad(Ribbon As IRibbonUI)
 Set R100Ribbon = Ribbon
End Sub

 

I know the name "R100Ribbon_onLoad" is not mistyped in any way, it is copied/pasted from one place to the other.  Yet when I run the spreadsheet I get the message: 

"Cannot run the macro 'R100Ribbon_onLoad'.  The macro may not be available in this workbook or all macros may be disabled. OK"

 

Macros are not disabled - the macros run perfectly well when called from the ribbon itself.  So why can it not recognise the R100Ribbon_onLoad macro?  Any help appreciated.

0 Replies