Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default how do you display a wait message while

a procedure is running behind the scenes??? The only thing I have used is
the msgbox but that pauses the process until you hit a key, and I am looking
to display a message for about 8 seconds, which is how long the process
should take, or until the process completes. How do you do both ??


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 415
Default how do you display a wait message while

A MsgBox is always modal; code stops until it has been dismissed.
You can show your own Userform with vbModeless, so code can continue.

NickHK

"WANNABE" <breichenbach AT istate DOT com l...
a procedure is running behind the scenes??? The only thing I have used is
the msgbox but that pauses the process until you hit a key, and I am
looking to display a message for about 8 seconds, which is how long the
process should take, or until the process completes. How do you do both ??



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default how do you display a wait message while

My preference is to use the status bar (where you get the Ready, Calculation,
.... messages) as users are already familiar with this. I then use a message
box at the end to let the user know that everything is done. Something like
this...

sub Whatever()
Application.StatusBar = "Processing. Please Wait..."
'your code here
Application.StatuBar = false
msgbox "Everything completed successfully..."
end sub
--
HTH...

Jim Thomlinson


"WANNABE" wrote:

a procedure is running behind the scenes??? The only thing I have used is
the msgbox but that pauses the process until you hit a key, and I am looking
to display a message for about 8 seconds, which is how long the process
should take, or until the process completes. How do you do both ??



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default how do you display a wait message while

http://www.j-walk.com/ss/excel/tips/tip34.htm

is one way. show it at the begining of your macro, update it as the macro
progresses, drop it at the end.

--
Regards,
Tom Ogilvy



"WANNABE" wrote:

a procedure is running behind the scenes??? The only thing I have used is
the msgbox but that pauses the process until you hit a key, and I am looking
to display a message for about 8 seconds, which is how long the process
should take, or until the process completes. How do you do both ??



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default how do you display a wait message while

All these responses' were great .. Thank you all!!

"Tom Ogilvy" wrote in message
...
http://www.j-walk.com/ss/excel/tips/tip34.htm

is one way. show it at the begining of your macro, update it as the macro
progresses, drop it at the end.

--
Regards,
Tom Ogilvy



"WANNABE" wrote:

a procedure is running behind the scenes??? The only thing I have used
is
the msgbox but that pauses the process until you hit a key, and I am
looking
to display a message for about 8 seconds, which is how long the process
should take, or until the process completes. How do you do both ??







  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default how do you display a wait message while

Yet another way... While both the below methods will pause time, only
the Application.Wait command allows for code to continue processing
while time is standing still. Hope this helps.

Application.Wait Now + TimeValue("00:00:03") 'Choose your time

---or---

Option Explicit

Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Public Const sTime = 1000 'Choose your time

Sub yourSub()

....some code, show, hide things...

Sleep sTime

....some code, show, hide things...

End Sub

Enjoy!

On Wed, 4 Oct 2006 11:02:58 -0500, "WANNABE" <breichenbach AT istate
DOT com wrote:

a procedure is running behind the scenes??? The only thing I have used is
the msgbox but that pauses the process until you hit a key, and I am looking
to display a message for about 8 seconds, which is how long the process
should take, or until the process completes. How do you do both ??

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default how do you display a wait message while

Think you need to look at the help on Application.Wait. It doesn't let the
code continue to run.

--
Regards,
Tom Ogilvy

"elachowitz" wrote in message
...
Yet another way... While both the below methods will pause time, only
the Application.Wait command allows for code to continue processing
while time is standing still. Hope this helps.

Application.Wait Now + TimeValue("00:00:03") 'Choose your time

---or---

Option Explicit

Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Public Const sTime = 1000 'Choose your time

Sub yourSub()

...some code, show, hide things...

Sleep sTime

...some code, show, hide things...

End Sub

Enjoy!

On Wed, 4 Oct 2006 11:02:58 -0500, "WANNABE" <breichenbach AT istate
DOT com wrote:

a procedure is running behind the scenes??? The only thing I have used is
the msgbox but that pauses the process until you hit a key, and I am
looking
to display a message for about 8 seconds, which is how long the process
should take, or until the process completes. How do you do both ??



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default how do you display a wait message while

Tom you are right and I was in haste in my post... I was reading into
pausing time for a progress bar/status message to repaint - I retract
my statement of code continuing when using the application.wait
command... Sorry for any confusion this may have caused.

On Thu, 5 Oct 2006 21:16:18 -0400, "Tom Ogilvy"
wrote:

Think you need to look at the help on Application.Wait. It doesn't let the
code continue to run.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
if, then display message puiuluipui Excel Discussion (Misc queries) 1 October 2nd 09 05:28 AM
sendkeys(keys,wait) how do I use wait MM Excel Discussion (Misc queries) 1 February 11th 09 03:47 PM
Display a message Ridhi Excel Worksheet Functions 4 June 3rd 08 02:43 PM
Processing...Please Wait Message Box Connie Excel Discussion (Misc queries) 3 October 19th 06 10:54 PM
Message Display Barb Reinhardt Excel Programming 5 October 25th 05 04:10 PM


All times are GMT +1. The time now is 07:13 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"