Timing
There are three ways you can do this: VBA.Timer, GetTickCount API or timeGetTime API.
VBA.Timer
This returns the number of seconds elapsed since midnight using a single-precision floating point value.
This is not a threaded control so may not be triggered at exactly the correct time.
Delays can be caused by other applications and or system processes.
GetTickCount API
This returns the number of milliseconds that have elapsed since Windows was started.
This will run for 49 days before resetting back to zero.
timeGetTime API
This returns the number of milliseconds that have elapsed since Windows was started.
Finding Bottlenecks
© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopPrevNext