User Form displayed while macro is running, close when finished.

Paul_K

New Member
Joined
Sep 1, 2016
Messages
29
Hello everyone,
I have a macro which take a few seconds to run and I want something to show on the screen so the user knows something is happening.
I don't want to use the Status bar because it's often missed by the users.

I have a Userform set up with text "Processing Please Wait", and have used PleaseWait.Show at the start of the macro and PleaseWait.Hide at the end.
However the macro doesn't run any further than PleaseWait.Show until the red X is clicked on the UserForm, which defeats the point.

Is there a way to have the Userform show while the macro is running and disappear at the end of the macro without any user input?

Thanks in advance.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
try

Code:
PleaseWait.Show vbModeless

Dave
 
Upvote 0
Also you can kick off the macro from within the userform - then the userform can also have the userform close itself when it completes.

(personally I'd prefer the status bar approach and the users suffer if they are too stupid to be able to understand a status bar).
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,030
Messages
6,122,762
Members
449,095
Latest member
m_smith_solihull

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