No Userform Contents When Process Running

Ark68

Well-known Member
Joined
Mar 23, 2004
Messages
4,562
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
I have a section of code that processes a large amount of complex calculations over a large database. It is executed through a button push on a userform.

When the user initiates this process, it is not uncommon for the user to believe that the process has stopped, or a crash has happened.

I would like to use a message userform (a simple userform with a label with the message "Please wait...") to keep the user posted.

It will show prior to the process, and unload following.

Code:
With ws_sched
        .AutoFilterMode = False
        pleasewait.Show
        With .Range("A:W")
            .AutoFilter field:=1, Criteria1:=r_type
            .Resize(Rows.Count - 1).Offset(1).EntireRow.Delete
        End With
        Unload pleasewait
        .AutoFilterMode = False
    End With

This has the appearance, but as long as the helper userform is showing, the process pauses. Only after the helper userform is closed does the process start. Not really what I wanted.

I changed the helper userform's showmodal property to false. The process completes with the helper userform displayed, but it is blank. (Just the window border and a white blank background.

Thoughts?
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Added DoEvents after pleasewait.show seems to have done the trick
 
Upvote 0
Userform should be modelles to allow code running, use:
PleaseWait.Show vbModeless

You can also manually set property of the form: ShowModal = False
 
Upvote 0

Forum statistics

Threads
1,213,543
Messages
6,114,238
Members
448,555
Latest member
RobertJones1986

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top