Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Tom is offline
external usenet poster
 
Posts: 6
Default Loops and Events

Hi,

Does anyone know how to do the following :

I want to execute a procedure/sub over and over again repeatedly, but *only*
if a particular cell in Excel is set to, say, "Y". I have tried using a
simple loop (Do ... Loop Until etc.) but while this runs the code as wanted,
it completely locks up Excel and stops you from doing anything to the cells
etc. In other words, there is no way of stopping the code. Also, if I can
get this principle working then I can also have other adjustable parameters
for the code using other cells.

Any ideas?

Thanks,

Tom


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Loops and Events

You could run it repeatedly using Ontime, say running it every 1, 2,3 secs
or whatever you choose. In the procedure invoked by OnTime, check if the
value is Y at the end, if so, reissue the OnTime, if not just exit.

Chip Pearson has a nice page on it at
http://www.cpearson.com/excel/ontime.htm

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Tom" wrote in message
...
Hi,

Does anyone know how to do the following :

I want to execute a procedure/sub over and over again repeatedly, but

*only*
if a particular cell in Excel is set to, say, "Y". I have tried using a
simple loop (Do ... Loop Until etc.) but while this runs the code as

wanted,
it completely locks up Excel and stops you from doing anything to the

cells
etc. In other words, there is no way of stopping the code. Also, if I

can
get this principle working then I can also have other adjustable

parameters
for the code using other cells.

Any ideas?

Thanks,

Tom




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
do events? background events cereldine[_15_] Excel Programming 1 April 12th 06 01:06 PM
Do loops grandfilth Excel Discussion (Misc queries) 1 November 10th 05 12:00 AM
Do loops within Do loops Linking to specific cells in pivot table Excel Programming 4 April 14th 05 08:47 AM
Do Loops Sue[_5_] Excel Programming 1 May 20th 04 07:51 PM
help with loops Rick B[_6_] Excel Programming 8 January 28th 04 12:32 AM


All times are GMT +1. The time now is 08:04 PM.

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"