Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / December 2007

Tip: Looking for answers? Try searching our database.

Application.OnTime every Y sec with Y NON integer?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
dexterslaboratory@katamail.com - 10 Dec 2007 11:35 GMT
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

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.