Project 2013 Custom UI - OnLoad

Joined
Mar 1, 2016
Messages
1
Reaction score
0
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"">"
...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top