I am using an .ontimer command to trigger a call to a sub every 6 seconds. However it seems that this event is very unreliable -Excel freezes up -- intermittently -- so I have been reading up on using the Windows API command SLEEP ---- if I understand that function correctly -- it simply pauses that thread --- so does that mean other threads within that workbook code gets time to finish --- before the thread where the SLEEP commands resides will continue. So I guess my questions is that if I want to use the SLEEP command --- I can then have a loop that runs for a very long time -- and inside the loop --- I use the SLEEP command to pause that piece of code for 6 seconds --- when it wakes up -- I then call the sub again. In other words is the SLEEP command used in this way less prone to freeze up excel than the .ontimer function.
I hope this makes sense.
Bookmarks