AnsweredAssumed Answered

DxD menu object too late when DxD launched from Expedtion

Question asked by jayson.h.harames on Nov 19, 2013
Latest reply on Nov 29, 2013 by peter_festesen

I am calling a script on DxD start up that adds a custom item to the tools menu.  All is fine if DxD is started from the PRJ.  If it is launched from Expedition I get an error beacuse the command bar doesnt exsist yet. I am unsure the best way to fix the problem. 

here is what I have.


  On Error Resume next 

   Set oCmdBarMenuItem = CommandBars("Sheet Menu Bar").Controls.Item("&Tools")

If Err.Number <>0 Then




    Set oButton = oCmdBarMenuItem.Controls.Add(cmdControlButton,,, 1)

    oButton.Caption = "DxD_BomGen" 


    oButton.OnAction = "RUN BomGen_DxD.vbs"

End if



Function msgerror ()



End function