Modeless Msgbox in Excel

Discussion in 'AutoCAD' started by jcallenj, Jun 4, 2004.

  1. jcallenj

    jcallenj Guest

    Stemming from the post "Msgbox in Excel"... Thanks to those who posted I
    have finally managed to show my userform in Excel. Been wanting to do that
    for a loong time now. Many thanks to you guys.

    But I promptly ran into another issue: Is it not possible for AutoCAD to
    wait for a modeless Excel userform to close before continuing?

    I tried using an Excel function that returns a value, and setting an
    arbitrary variable in the ACAD module to ExclApp.run...etc. thinking then it
    would have to wait. But no, it blazed right on through and the Excel
    function even returned it's value without me ever having a chance to touch
    the modeless userform.

    Basically, I want ACAD to pass focus to Excel, where I can do my work and
    have a button to explicitly tell ACAD when I am done working, so that the
    ACAD macro knows when it can finish. I have had this very thing for a while
    now and it works great, except that my "gotoacad" button shows in ACAD, not
    Excel. Am I going about this all wrong?
     
    jcallenj, Jun 4, 2004
    #1
  2. jcallenj

    cascadtx Guest

    Why not make it two macros in AutoCAD? One calls Excel, the other is called by Excel when you're finished over there.
    Also, look into vba.appactivate.

    ------------------------
    Basically, I want ACAD to pass focus to Excel, where I can do my work and
    have a button to explicitly tell ACAD when I am done working, so that the
    ACAD macro knows when it can finish. I have had this very thing for a while
    now and it works great, except that my "gotoacad" button shows in ACAD, not
    Excel. Am I going about this all wrong?
     
    cascadtx, Jun 21, 2004
    #2
  3. jcallenj

    James Allen Guest

    That's a good idea. I'll have to give it some thought...

    Thanks,

    James
     
    James Allen, Jun 21, 2004
    #3
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.