Project 2013 Custom UI - OnLoad

Discussion in 'Project' started by MrSkillz, Mar 1, 2016.

  1. MrSkillz


    Mar 1, 2016
    Likes Received:
    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="""">"
    MrSkillz, Mar 1, 2016
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.