ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Time intervals below 1 second. (https://www.excelbanter.com/excel-programming/286308-time-intervals-below-1-second.html)

Derek[_6_]

Time intervals below 1 second.
 
Hi folks, help please with Excel2000

I would like to repeat a macro at say half second
intervals. Using "Application.Wait (Now + TimeValue
("00.00.01"))" seems to limit me to one second. Whats the
solution please?

TIA. derek

Francine Kubaka

Time intervals below 1 second.
 
Use the system's high-resolution timer.

The full code with class can be found in John Green's "Excel 2000 VBA", page
336.

Cheers,
FK




"Derek" wrote in message
...
Hi folks, help please with Excel2000

I would like to repeat a macro at say half second
intervals. Using "Application.Wait (Now + TimeValue
("00.00.01"))" seems to limit me to one second. Whats the
solution please?

TIA. derek




Rob van Gelder[_4_]

Time intervals below 1 second.
 
I would maintain my own form of time ticks. So each interval represented,
say, a 100th of a second.
Special functions would be needed to convert this back to excel/vba time.

Windows API provides some of this functionality for you, in the form of
SYSTEMTIME type:
http://groups.google.co.nz/groups?hl...6a6%40kurtfish

Interestingly, this other article shows an example of sub-second resolution.
=NOW() in A1, format A1 as "hh:mm:ss.00"
http://groups.google.co.nz/groups?hl...s.chatlink.com



"Derek" wrote in message
...
Hi folks, help please with Excel2000

I would like to repeat a macro at say half second
intervals. Using "Application.Wait (Now + TimeValue
("00.00.01"))" seems to limit me to one second. Whats the
solution please?

TIA. derek





All times are GMT +1. The time now is 05:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com