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?

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.
Similar Threads
  1. tlex1
    Replies:
    0
    Views:
    1,057
    tlex1
    Jun 2, 2011
  2. ViperMan
    Replies:
    0
    Views:
    418
    ViperMan
    Jun 21, 2011
  3. jpgrill
    Replies:
    0
    Views:
    502
    jpgrill
    Oct 11, 2012
  4. LCB
    Replies:
    0
    Views:
    3,379
  5. Elton Ebersole
    Replies:
    1
    Views:
    1,628
    Jonathan Law
    Apr 12, 2017
  6. Deeprodigytx

    project project forward

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