I had written a program to create a commandbar from VBA. It was in X4 and executed well. The program with
Dim CmdBar As CommandBarDim CmdBtn As CommandBarControl
now does not run in X5. Says "User defined type not defined. I cannot find the way to set a variable for commandbar and commandbarcontrol. How can I do it in X5.
Need to add vgcoreauto.tlb in references
Sub testCmdBar() Dim c As CommandBar, s$ For Each c In CommandBars s = s & c.NameLocal & vbCr Next MsgBox sEnd Sub
Brian, John and Sancho. Big thanks for looking into it. So now I think I would be able to create a commandbar like I did in X4. Thank you very much all of you guys.