ZoomPickWindow

Discussion in 'AutoCAD' started by cascadtx, Aug 6, 2003.

  1. cascadtx

    cascadtx Guest

    VBA project with command button on a userform.
    You'd think something like this would work:

    Private Sub cmdZoomW_Click()
      Me.Hide
      Application.ZoomPickWindow
      Me.Show
      MsgBox "Continue executing code."
    End Sub

    Try it! Then how?
     
    cascadtx, Aug 6, 2003
    #1
  2. cascadtx

    Kevin Terry Guest

    If your form is showing on screen, then your code is 'running', although no additional events will fire until you trigger them via controls. Try moving whatever code you need to run _before_ the me.show line.




    Kevin



    "cascadtx" <> wrote in message news:...

    VBA project with command button on a userform.
    You'd think something like this would work:

    Private Sub cmdZoomW_Click()
      Me.Hide
      Application.ZoomPickWindow
      Me.Show
      MsgBox "Continue executing code."
    End Sub

    Try it! Then how?
     
    Kevin Terry, Aug 6, 2003
    #2
  3. cascadtx

    cascadtx Guest

    I could have sworn I made a reply to this earlier but
    I don't see it here. What I said was, what you have
    said is true but then you end up stacked inside the
    sub until you unload the form. Seems like it could be
    a problem with multiple calls. You can set a code
    break on the End Sub to see this. The proper route
    would be to load the form nonmodal so it wouldn't need
    to be hidden for the interaction. But AutoCAD won't
    let a nonmodal userform take the focus so you can
    interact with the form from the keyboard (only mouse
    clicks).
     
    cascadtx, Aug 6, 2003
    #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.
Similar Threads
There are no similar threads yet.
Loading...