Project 2013 Custom UI - OnLoad

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

  1. MrSkillz

    MrSkillz

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

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tlex1
    Replies:
    0
    Views:
    977
    tlex1
    Jun 2, 2011
  2. ViperMan
    Replies:
    0
    Views:
    381
    ViperMan
    Jun 21, 2011
  3. jpgrill
    Replies:
    0
    Views:
    457
    jpgrill
    Oct 11, 2012
  4. LCB
    Replies:
    0
    Views:
    3,202
  5. Elton Ebersole
    Replies:
    0
    Views:
    1,547
    Elton Ebersole
    May 20, 2014
  6. Deeprodigytx

    project project forward

    Deeprodigytx, Dec 10, 2014, in forum: Project
    Replies:
    0
    Views:
    367
    Deeprodigytx
    Dec 10, 2014
  7. cag8f
    Replies:
    0
    Views:
    301
    cag8f
    Feb 1, 2015
  8. Bala Bhavana
    Replies:
    0
    Views:
    399
    Bala Bhavana
    Jul 27, 2015
Loading...