nonmodal? - Message box without halting macro

selkov

Well-known Member
Joined
Jan 26, 2004
Messages
787
I have searched thru many posts but can't get seem to find how to just display a text box/msg that says something simple like pls wait - processing while the macro runs.

Any Ideas?
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
I have searched thru many posts but can't get seem to find how to just display a text box/msg that says something simple like pls wait - processing while the macro runs.

Any Ideas?

Have you tried using a modeless userform for displaying the message ?
 
Upvote 0
Show us your script. Including the part with your Userform message.
It should look something like this:

Userform1.show modeless

my script here

Unload userform1



I tried but could not get it to work.
 
Upvote 0
Please see below, Thanks

Private Sub Workbook_Open()

userform1.Show modeless
PLEASE WAIT UPDATING THE DATA

Workbooks(ThisWorkbook.Name).RefreshAll
Unload userform1

userform2.Show modeless
PLEASE WAIT WHILE WE refresh your page
ActiveSheet.PivotTables(1).PivotCache.Refresh

Unload userform2


'

End Sub
 
Upvote 0
The ideal is:

1.You make a userform
2. On the Userform you enter the text you want seen using a label or textbox
3. When the Userform pops up the user sees the message.

You would not have this line of code in your script:
"PLEASE WAIT UPDATING THE DATA"







Please see below, Thanks

Private Sub Workbook_Open()

userform1.Show modeless
PLEASE WAIT UPDATING THE DATA

Workbooks(ThisWorkbook.Name).RefreshAll
Unload userform1

userform2.Show modeless
PLEASE WAIT WHILE WE refresh your page
ActiveSheet.PivotTables(1).PivotCache.Refresh

Unload userform2


'

End Sub
 
Upvote 0
Actually you would need to Use a label on your UserForm.
Or a textbox. But if you use a textbox you would need a script in the userform to load the data into the Textbox.
 
Upvote 0

Forum statistics

Threads
1,223,900
Messages
6,175,276
Members
452,629
Latest member
SahilPolekar

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