+ Reply to Thread
Results 1 to 3 of 3

Why is my UserForm Pausing Procedure?

  1. #1
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208

    Why is my UserForm Pausing Procedure?

    Some quick background:

    Excel 97
    UserForm is a progress bar (from j-walk), named frmProgress

    I have a procedure written to import a text file and complete various formatting to the data. The procedure takes a while in two different areas, so I have created a progress bar UserForm to indicate the progress (obviously) of each of these two tasks.

    My problem is that when the UserForm is shown, the procedure is paused. It will just sit there and not do anything. However, if I close the UserForm, the procedure will continue. If I type CTRL + Break, the frmProgress.Show line is highlighted. This also occurs when the UserForm is shown the second time in my procedure.

    Does anyone know what is causing this? Here is an excerpt of my first loop with the UserForm:
    Please Login or Register  to view this content.
    TIA

    Jason

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Jason,

    By default, UserForms are created as modal dialogs. This means that when the user form is displayed, that it alone receives user input. Control is returned to the calling thread after the form has been closed. This is why iyour code is pausing when the user form is shown.

    Sincerely,
    Leith Ross

  3. #3
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    Thanks, Leith. I guess I can separate my procedure into a few different procedures, and then call the next procedure after the UserForm is shown from the Activate event handler.

    Jason

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1