Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Interrupting a loop

I have a macro that loops and within the loop produces and
emails a variety of workbooks. The process can take 15-20
minutes. Is there a graceful way to interrupt the loop at
a set interval other than pressing the escape key and
hoping for the best.

Thank you
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Interrupting a loop

You could set a variable to Now before the loop starts, and then within the
loop check Now against that variable le, and if it exceeds a pre-set amount
of time, terminate the loop.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Andrea" wrote in message
...
I have a macro that loops and within the loop produces and
emails a variety of workbooks. The process can take 15-20
minutes. Is there a graceful way to interrupt the loop at
a set interval other than pressing the escape key and
hoping for the best.

Thank you



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
Interrupting Calculation Iterations Andrew Lee[_2_] Excel Discussion (Misc queries) 0 July 13th 07 04:30 AM
Interrupting Calculation Iterations Andrew Lee Excel Worksheet Functions 0 July 12th 07 04:38 AM
Interrupting A Worksheet Calculation carl Excel Worksheet Functions 2 November 22nd 05 07:18 PM
HELP!!!! Can't stop a loop (NOT an infinite loop) TBA[_2_] Excel Programming 3 December 14th 03 03:33 PM
Interrupting an add line Brian McGuire[_2_] Excel Programming 1 December 9th 03 07:39 PM


All times are GMT +1. The time now is 11:09 PM.

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"