PC Review


Reply
Thread Tools Rate Thread

display message while code is running

 
 
Bassman62
Guest
Posts: n/a
 
      10th Nov 2008
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
 
Reply With Quote
 
 
 
 
Barb Reinhardt
Guest
Posts: n/a
 
      10th Nov 2008
Have you tried using

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

And
Application.StatusBar = FALSE

to Turn off.
--
HTH,
Barb Reinhardt

If this post was helpful to you, please click YES below.



"Bassman62" wrote:

> 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

 
Reply With Quote
 
Gary''s Student
Guest
Posts: n/a
 
      10th Nov 2008
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

--
Gary''s Student - gsnu200812


"Bassman62" wrote:

> 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

 
Reply With Quote
 
Bassman62
Guest
Posts: n/a
 
      10th Nov 2008


"Gary''s Student" wrote:

> 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
>
> --
> Gary''s Student - gsnu200812
>
>
> "Bassman62" wrote:
>
> > 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

 
Reply With Quote
 
Bassman62
Guest
Posts: n/a
 
      10th Nov 2008
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

"Gary''s Student" wrote:

> 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
>
> --
> Gary''s Student - gsnu200812
>
>
> "Bassman62" wrote:
>
> > 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

 
Reply With Quote
 
Gary''s Student
Guest
Posts: n/a
 
      10th Nov 2008
Sounds like a good approach
--
Gary''s Student - gsnu200812


"Bassman62" wrote:

> 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
>
> "Gary''s Student" wrote:
>
> > 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
> >
> > --
> > Gary''s Student - gsnu200812
> >
> >
> > "Bassman62" wrote:
> >
> > > 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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
display running total using all client side code Paul Microsoft ASP .NET 3 22nd Oct 2008 06:36 PM
Display a message with code running. =?Utf-8?B?TWFyaw==?= Microsoft Dot NET 0 11th Aug 2006 02:28 PM
Display Message While Running Macro Db1712 Microsoft Excel Misc 2 8th Nov 2004 10:45 PM
Error message when running SQL from code shaggles Microsoft Access VBA Modules 5 29th Nov 2003 07:35 AM
How to display status and keep code running ExcelMan Microsoft Excel Programming 1 20th Sep 2003 04:31 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:39 PM.