![]() |
How do I pause a Macro whilst it is running?
I have a macro which simply switches between two
worksheets, but I would like to pause the macro so that it shows one worksheet for say 2 minutes and then switches to the next worksheet for say 2 minutes and then starts again. I know how to loop - it is just the "pausing" that I cannot work out. Does anyone have any ideas? |
How do I pause a Macro whilst it is running?
Application.Wait "00:00:00"will continue the macro at 00:00:00
"Gary" schreef in bericht ... I have a macro which simply switches between two worksheets, but I would like to pause the macro so that it shows one worksheet for say 2 minutes and then switches to the next worksheet for say 2 minutes and then starts again. I know how to loop - it is just the "pausing" that I cannot work out. Does anyone have any ideas? |
How do I pause a Macro whilst it is running?
One way:
Do While True For i = 1 to 2 Sheets(i).Select Application.Wait Now + TimeSerial(0, 2, 0) Next i Loop In article , "Gary" wrote: I have a macro which simply switches between two worksheets, but I would like to pause the macro so that it shows one worksheet for say 2 minutes and then switches to the next worksheet for say 2 minutes and then starts again. I know how to loop - it is just the "pausing" that I cannot work out. |
How do I pause a Macro whilst it is running?
Wait for 2 minutes :-
Application.Wait Now + TimeValue("00:02:00" -- Message posted from http://www.ExcelForum.com |
How do I pause a Macro whilst it is running?
You didn't like all the suggestions you got yesterday in .misc?
http://groups.google.com/groups?thre...BADC%40msn.com If you're looking for old posts, you can use google (maybe a few hours behind) to search for stuff you've posted (and find the replies, too) http://groups.google.com/advanced_group_search http://groups.google.com/advanced_gr...Excel*&num=100 Ron de Bruin has an excel addin that you may like: http://www.rondebruin.nl/Google.htm Gary wrote: I have a macro which simply switches between two worksheets, but I would like to pause the macro so that it shows one worksheet for say 2 minutes and then switches to the next worksheet for say 2 minutes and then starts again. I know how to loop - it is just the "pausing" that I cannot work out. Does anyone have any ideas? -- Dave Peterson |
All times are GMT +1. The time now is 11:05 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com