Results 1 to 2 of 2
Thread: Periodic macros (XP)
2005-04-01, 08:39 #1
- Join Date
- Apr 2005
- Thanked 0 Times in 0 Posts
Periodic macros (XP)
Hi, I'm new to this board I apologize if this has been explained before.
Is there a way for access to automatically run a macro or a program like every five minutes?
In this case, I need access to look for a specific file, if it's not there, no changes have been made and nothing has to happen.
If the file exists, then I need access to run a certain macro and then delete the file.
Can this be done?
I hope you can help me,
2005-04-01, 08:46 #2
- Join Date
- Mar 2002
- Thanked 30 Times in 30 Posts
Re: Periodic macros (XP)
Welcome to Woody's Lounge!
You can do this from a form; a form has an event and a property relevant to this question: the On Timer event fires every TimerInterval milliseconds.
To make the On Timer event fire every 5 minutes set TimerInterval to 300000 (that is 5 * 60 * 1000)
(If you want to disable the On Timer event, set TimerInterval to 0)
You can call a macro or procedure from the On Timer event: enter the name of the macro in the On Timer property in the Event tab of the Properties window, or select [Event Procedure] and create code like this:
Private Sub Form_Timer()
Note: the form must be open (hidden, if you like) for the On Timer event to work.