What's an alternate for this in X5 VBA

I had written a program to create a commandbar from VBA. It was in X4 and executed well. The program with

Dim CmdBar As CommandBar
Dim 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.

Parents
  • Hi Anand,

    ok, I started to actually think instead of looking for the answer. For starters you can replace

    Dim CmdBar As CommandBar

    with

    Dim app As Application
    Set app = CorelDRAW.Application
    app.CommandBars.Add

    I just tested this and it works. I have not looked at the 2nd part yet, but will do so now.

    Best regards,
    Brian

     

Reply Children