Dear all,
my question is about the Application.OnTime Method.
Usually I use it after having these two variables defined:
Public RunWhen As Double
Public Const cRunIntervalSeconds = X
then the operation/procedure to be scheduled starts periodically when:
RunWhen = Now + TimeSerial(0, 0, cRunIntervalSeconds)
Doing so, I can schedule my macros every X seconds where X is an
integer.
Now I wonder whether is possible scheduling event every Y seconds with
Y decimal (e.g.: 1.2 s, 4.5 s ...).
Any suggestion?
BR,
CR
JE McGimpsey - 10 Dec 2007 12:12 GMT
It's not possible using OnTime - the EarliestTime argument is rounded to
the nearest second.
In article
<c4a6867b-25ba-495a-8094-2a719a72cdd4@e67g2000hsc.googlegroups.com>,
> Now I wonder whether is possible scheduling event every Y seconds with
> Y decimal (e.g.: 1.2 s, 4.5 s ...).
Bob Phillips - 10 Dec 2007 12:54 GMT
You can do this with APIs if it is that important.

Signature
---
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
> Dear all,
>
[quoted text clipped - 19 lines]
> BR,
> CR
dexterslaboratory@katamail.com - 11 Dec 2007 11:30 GMT
> You can do this with APIs if it is that important.
>
[quoted text clipped - 5 lines]
>
> (there's no email, no snail mail, but somewhere should be gmail in my addy)
Bob,
thanks for your feedback.
I googled this matter with "APIs" as keyword and I have found this
interesting page from Chip Pearson's site:
http://www.cpearson.com/excel/OnTime.aspx
He suggests some procedures that work perfectly for my case.
BR,
CR
Bob Phillips - 11 Dec 2007 12:35 GMT
Yep, that is the sort of code that I meant.

Signature
---
HTH
Bob
(there's no email, no snail mail, but somewhere should be gmail in my addy)
>> You can do this with APIs if it is that important.
>>
[quoted text clipped - 19 lines]
> BR,
> CR