Create a background VBA Timer

  • Thread starter Thread starter Walt Boraczek
  • Start date Start date
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?
 
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
 
Back
Top