use vba to run a windows scheduled task

  • Thread starter Thread starter ddbartley
  • Start date Start date
This is right out of VBA help file.

This example runs my_Procedure at 5 P.M.:

Application.OnTime TimeValue("17:00:00"), "my_Procedure"

This example cancels the OnTime setting from the previous example.:

Application.OnTime EarliestTime:=TimeValue("17:00:00"), _
Procedure:="my_Procedure", Schedule:=False
 
See if you can find the file tskschd.dll from E Morgillo on the net if you
want to do more than just run a task.

RBS
 
I'm trying to find vba code to run a windows scheduled task. Any ideas?

If you're on XP go to All Programs->Accessories->System Tools-
Scheduled Tasks .

You can run Excel.exe, a VBScript, a BAT script, or whatever from
there.
 
Back
Top