View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.programming
Martin[_16_] Martin[_16_] is offline
external usenet poster
 
Posts: 13
Default Reset system clock?

Sorry John,

My mistake here. I tried to briefly summarise what I was doing to answer
Chip's point. The code is timed to run every 43 seconds to take into account
the time taken with the procedures. During the 43 second gap, control is
returned to the PC as it would be with "DoEvents" and "DoEvents" does
already appear on six occasions within the existing code.

Thanks again

Martin

jaf wrote in message
...
Hi Martin,
If your code is running constantly then Windows may not get enough cycles

to
do its housekeeping tasks and the slow running clock is the result.
There is a DoEvents command that you should run to let Windows catch up.
It releases (or stops) your code back to Windows and the code won't

continue
until Windows has finished doing its thing.
You CAN run DoEvents to often. Doing so will slow everything down.
Find a spot in your code to run a DoEvents every few minutes. Once a

minute
would be fine.




--
John
johnf 202 at hotmail dot com