Create a background VBA Timer

W

Walt Boraczek

I am trying to create a process in an Excel-based solution
that can perpetually check a network directory for changes
while not preventing Excel from remaining functional. All
of the timer functions I'm aware of seem to prevent the
user from interacting with the app while the timer is
running. Does anyone know of something that can help?
 
H

Henry

Walt,

There's a timer running in the background all the time windows, or any other
application is running.
Its the windows system clock!!!

Set a variable to Time
MyStartTime = Time
If your looking for a 5 min delay

Do while MyStartTime > Time -"00:05:00"
'"Hours(00 - 24):Mins(00 - 60):Seconds (00 - 60)"
'Don't use "=" as, if the progam is doing something else, the event may get
missed.
'you can put "thing to do whilst your waiting" here.
'doodle, twiddle your thumbs, scratch your head,
'make a cup of coffee, tea etc.,etc

Loop

'Time's up

HTH
Henry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top