Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Can I tell my Macro to stop running for 10sec?


Hi,

Is there anyway to tell a macro to "Pause" when it gets to a certain
stage for a set amount of time?

After the set amount of time I need it to start again!

Any ideas?
Regards
Garry


--
Gazzr
------------------------------------------------------------------------
Gazzr's Profile: http://www.excelforum.com/member.php...o&userid=31075
View this thread: http://www.excelforum.com/showthread...hreadid=534402

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default Can I tell my Macro to stop running for 10sec?

Try this:

Sub waiting()
Application.Wait (Now + TimeValue("0:00:10"))
MsgBox "Hello"
End Sub

Or, you may also have a look at the OnTime method.

Regards,
Edwin Tam

http://www.vonixx.com


"Gazzr" wrote:


Hi,

Is there anyway to tell a macro to "Pause" when it gets to a certain
stage for a set amount of time?

After the set amount of time I need it to start again!

Any ideas?
Regards
Garry


--
Gazzr
------------------------------------------------------------------------
Gazzr's Profile: http://www.excelforum.com/member.php...o&userid=31075
View this thread: http://www.excelforum.com/showthread...hreadid=534402


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Can I tell my Macro to stop running for 10sec?

from the vb help file
This example runs my_Procedure 15 seconds from now.

Application.OnTime Now + TimeValue("00:00:15"), "my_Procedure"

--


Gary


"Gazzr" wrote in message
...

Hi,

Is there anyway to tell a macro to "Pause" when it gets to a certain
stage for a set amount of time?

After the set amount of time I need it to start again!

Any ideas?
Regards
Garry


--
Gazzr
------------------------------------------------------------------------
Gazzr's Profile:
http://www.excelforum.com/member.php...o&userid=31075
View this thread: http://www.excelforum.com/showthread...hreadid=534402



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Can I tell my Macro to stop running for 10sec?


They were both excellent answers. I'll make sure I check out "Help" next
time!

Thanks
Garry


--
Gazzr
------------------------------------------------------------------------
Gazzr's Profile: http://www.excelforum.com/member.php...o&userid=31075
View this thread: http://www.excelforum.com/showthread...hreadid=534402

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
Stop Macro running when I save the workbook TyreDude Excel Worksheet Functions 1 July 9th 11 12:35 AM
How do I stop a Macro from running? JulianB Excel Worksheet Functions 1 April 10th 06 10:33 PM
How to stop a macro while it is running ? Srikanth[_7_] Excel Programming 1 September 15th 04 12:59 AM
When Save As stop running macro M K W Excel Programming 3 September 2nd 03 03:06 PM
How to Pause or Stop a running Macro jfeka[_2_] Excel Programming 0 July 17th 03 11:14 PM


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

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

About Us

"It's about Microsoft Excel"