Using xml to add a custom UI to a Project 2013 application by building an xml string (RibbonXML) and then loading it with SetCustomUI method. All works well until I try to add a callback. Excerpt follows, and causes "Automation Error - Exception Occurred" to fire twice, but new tab loads to ribbon fine. If I delete onLoad=""OnRibbonLoad"" it works fine, but I cannot reference the ribbon tab.
Public EC_Ribbon As IRibbonUI
Public Sub OnRibbonLoad(Ribbon As IRibbonUI)
Set EC_Ribbon = Ribbon
EC_Ribbon.ActivateTab "EC"
End Sub
Private Sub myRibbon()
Dim RibbonXML As String
Dim XMLOutput As String
XMLOutput = "C:\EC Estimating\CustomUI\XML Out.xml"
RibbonXML = "<customUI onLoad=""OnRibbonLoad"" xmlns=""http://schemas.microsoft.com/office/2009/07/customui"">"
...
Public EC_Ribbon As IRibbonUI
Public Sub OnRibbonLoad(Ribbon As IRibbonUI)
Set EC_Ribbon = Ribbon
EC_Ribbon.ActivateTab "EC"
End Sub
Private Sub myRibbon()
Dim RibbonXML As String
Dim XMLOutput As String
XMLOutput = "C:\EC Estimating\CustomUI\XML Out.xml"
RibbonXML = "<customUI onLoad=""OnRibbonLoad"" xmlns=""http://schemas.microsoft.com/office/2009/07/customui"">"
...