Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default How to Pause or Stop a running Macro

I have written the following macro which has the effect
of repeating another macro every 20 seconds. You'll note
that it calls the other sub "upDateHis" and this ends
with calling this one ... in effect creating an endless
loop.


Sub rePeater()

Application.OnTime Now + TimeValue
("00:00:20"), "upDateHis"


End Sub

This is fine most of the time, but there are times when I
don't want this loop running and I'm wondering if someone
can suggest a way to either stop or pause this running
macro that I could activate through a control button in
my worksheet. (I know I can stop it by putting in a
break point in the VB code, but I'd prefer something a
bit more elegant)

What ideas do you have?

Jack
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
pause a macro tsmith Excel Discussion (Misc queries) 9 January 22nd 09 12:47 AM
How do I pause a macro? Dave H Excel Discussion (Misc queries) 5 May 3rd 08 04:53 PM
How do I stop a Macro from running? JulianB Excel Worksheet Functions 1 April 10th 06 10:33 PM
How to stop getting the file save box when running a macro Pank Mehta Excel Discussion (Misc queries) 1 March 29th 05 04:05 PM


All times are GMT +1. The time now is 10:12 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"