Weird problem with UserForm

Discussion in 'AutoCAD' started by TomV, Mar 10, 2005.

  1. TomV

    TomV Guest

    I finished my project and to remove the dvb bloat I did a vbaman saveas. Now, when I run my project, the main userform will not keep focus. The form loads and immediately loses focus. Everything still works, though. If I left-click and hold the mouse button down, the form has focus (the caption bar changes color). As soon as I release the mouse button, focus is lost on the form. If I click on any control on the form, the form will get focus and after the operation, it again loses focus.

    I've tried saving the project, doing another vbaman saveas, compiling, but nothing works.

    This is really weird, but then again it is vba. Has this happened to anybody else?

    Thanks,
    Tom
     
    TomV, Mar 10, 2005
    #1
  2. I haven't used VBA in a long time
    and I don't know if it's related to your
    problem but I do recall having problems with
    the form focus when the form was
    loaded modeless.
    I also remember using the acfocus control
    to fix this.

    If you load the form as modal you should have
    no focus problem at all
     
    Jorge Jimenez, Mar 12, 2005
    #2
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.