View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Leith Ross[_658_] Leith Ross[_658_] is offline
external usenet poster
 
Posts: 1
Default Fraction of seconds


Hello Art,

You have 2 choices for more precision. The VBA Timer will provide yo
with accuracy to 1/100 of a second. The API timer will provide accurac
to 1/1,000 of a second.

The VBA Timer is easy yo use but has to be used in a loop. The AP
Timer is more a little more complex but can runs unattended in th
background. I am going to skip posting the API Timer code due to it
length. If you decide you need the API Timer, let me know in your nex
post and I will post the code separately.

VBA Timer example...

Code
-------------------

Sub TimeLoop()

Delay = 0.02
StartTime = Timer

Do While Timer < StartTime + Delay
DoEvents
'Your code goes in here
Loop

End Sub

-------------------


Sincerely,
Leith Ros

--
Leith Ros
-----------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...fo&userid=1846
View this thread: http://www.excelforum.com/showthread.php?threadid=56184