Menu Macros go Nuts

Discussion in 'AutoCAD' started by D Hartley, May 25, 2004.

  1. D Hartley

    D Hartley Guest

    I have an application where I create both tool bar and menu macros that run
    a vba routine.
    The toolbars work just fine using the macro shown below. However, when I
    try to run the macro from the menu, it usually works just once, and then it
    goes nuts, and just repeats some apparantly random command, like "Pick" or
    "Erase"

    Why would my Toolbar work, but not my menu?


    Set objMenuItem = objMenu.AddMenuItem(0, "Make New Thing", "^C^C & -vbarun _
    ThingMaker.dvb!Module1.ThingMakerSub & ;")
    objHipMenuItem.HelpString = "Start Making A New Thing"
     
    D Hartley, May 25, 2004
    #1
  2. I had the same problem. See my post "Calling Macros" 5.24.04 for how I got
    around it.
    But I suppose there's a better way (I hope!).
     
    Allen Johnson, May 25, 2004
    #2
  3. My theory is that you are changing the macro string while AutoCAD is still
    processing it, thereby confusing AutoCAD.
     
    Allen Johnson, May 25, 2004
    #3
  4. Editing issue - thick fingered typing:
    Should be as follows with NO line breaks and NO '&'s:

    Set objMenuItem = objMenu.AddMenuItem(0, "Make New Thing",
    "^C^C-vbarun;ThingMaker.dvb!Module1.ThingMakerSub;")
     
    Mike Tuersley, May 26, 2004
    #4
Ask a Question

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.