display message while code is running

B

Bassman62

How can I display a message while a macro is running and then have the
message automatically stop displaying when the macro completes.
Example: "Please wait while the list is updating."
I've tried MsgBox but this seems to require a user to click on "OK".
Thank you.
Dave
 
B

Barb Reinhardt

Have you tried using

Application.StatusBar = "Please wait while the list is updating."

And
Application.StatusBar = FALSE

to Turn off.
 
G

Gary''s Student

Consider:

Sub Macro1()
ActiveSheet.Shapes.AddTextbox(msoTextOrientationHorizontal, 255#, 99.75, _
202.5, 96#).Select
Selection.Name = "waitabit"
Selection.Characters.Text = "PLEASE WAIT"
Range("H5").Select
Application.Wait Now() + TimeValue("00:00:02")
ActiveSheet.Shapes("waitabit").Select
Selection.Cut
End Sub
 
B

Bassman62

Gary''s Student said:
Consider:

Sub Macro1()
ActiveSheet.Shapes.AddTextbox(msoTextOrientationHorizontal, 255#, 99.75, _
202.5, 96#).Select
Selection.Name = "waitabit"
Selection.Characters.Text = "PLEASE WAIT"
Range("H5").Select
Application.Wait Now() + TimeValue("00:00:02")
ActiveSheet.Shapes("waitabit").Select
Selection.Cut
End Sub
 
B

Bassman62

Sorry. My last reply did not display my text.
-
Thank you for your suggestion.
I accoumplished my goal by calling Macro1 from my main macro but did not
include the "Wait" or "Cut" lines.
I then "Cut" the shape at the end of my main macro.
Thanks again.

Dave
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Top