Add Microsoft Excel 9.0 Object Library as a reference
Put this in your general declarations
Code:
Dim oExcel As New Excel.Application
Put this in your Form's initialize event
Code:
oExcel.Visible = False
oExcel.DisplayAlerts = False
oExcel.Workbooks.Open ("Y:\Cost\Wally\Past Daily Runs\Test.xls")
Add a Timer control to your form. Change the interval property from 0 to 1.
In the timer event of the Timer control, put the following code
Code:
If Time = "7:00:00 AM" Then
oExcel.Run "Sub Test"
oExcel.ActiveWorkbook.Save
oExcel.Quit
End
End If
This worked for me using VB6 and Excel 2000