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.
Hi Anand,
did you manage to get that macro working? I attempted to run Sancho's code, but I got the same error message you mentioned in your first post. Just curious if you found the required Reference which makes it work?
If you can't get it going please let us know....as they say, 4 heads is better than one.
Best regards,Brian.
Hi Brian
I was a bit tied up selling boxes than of macros. So could not try it out. Shall get back on this ASAP.
I like this one.
Brian said: If you can't get it going please let us know....as they say, 4 heads is better than one.
Sorry about the poor grammar, my brain is faster than my fingers and I am often thinking 2 lines ahead when my fingers are still typing the first sentence. I should have said, 4 heads ARE better than one.