Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel 2007 Application.ontime

Status
Not open for further replies.

kennedymr2

Programmer
Joined
May 23, 2001
Messages
594
Location
AU
I need to have 2 timers running in Excel 2007

I have one timer working fine... it does a function every
2 minutes.

I also need to test if a files content has changed, say every 1 second. ie open a file for input, read the 1st line and then close. If the data is different run a function.

???can i have more than 1 application.ontime

or do i have to have say a public variable that triggers the 2 minute function every time it gets to 120.

??if i use the windows timer, i guess it would trip up on the application.ontime..??? i would rather not use this

Appreciate any ideas

Kennedymr2
 
The quick answer is that yes, you can have more that one OnTime event ( not tested, this is from memory ... can't get to Excel 2007 today ).

Cheers, Glenn.

Beauty is in the eye of the beerholder.
 
Glenn... Thanks...I have now had a bit more of a look at it and can see that ,you are right, you can have multiple .ontime's...i did not quite understand how it all worked. I am used to VB6 timers...
Pity VBA does not had a more simple timer system

Regards Kennedymr2
 
FYI, OnTime is not VBA but a method of the Excel.Apllication object ...
 
PVH....I was not real sure where to place this question...
I am calling the .ontime from vba source code, but i agree,
it is an Excel function.

I now have it working... Have been involved with VB6 for so long, i was loooking at with 'blinkers' on....

Regards Kennedymr2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top