Windows 7 Trouble with Windows 7 Task Scheduler

ryguy7272

Well-Known Member
I used to work with the Windows Task Scheduler every day, a few years ago; haven’t touched it in a while. So, today, I entered the appropriate info for General, Triggers, Actions, Conditions, Settings, and History. I am trying to open an XLSB file, which contains workbook open code in ‘ThisWorkbook’; code here:
Private Sub Workbook_Open()
Call GetFiles
End Sub

So, when I double-click the WB it opens just fine, the event triggers the macro, and everything is lovely. I can’t seem to make this work from the Windows Task Scheduler though. Frustrating. I see Excel open in the Task Manager!! For some reason, unbeknownst to me, WTS is NOT controlling the open event of this XLSB WB. Any ideas? Everything seems correct. I don’t get any error message. It seems like it runs, but it actually doesn’t run.

Thanks everyone!!
 
I don't have much experience with the more complex parts of Task Scheduler but my only thought is you may need to add a parameter to the executable in the properties window.
 
Well, the parameter is optional. Also, intuitively, it doesn't make sense to me to do this. I don't even know what kind of parameter I would add.

When the time comes, Task Scheduler opens an instance of Excel, but it will not open the Excel file and thus it will not run my Macro:
Private Sub Workbook_Open()
Call GetFiles
End Sub

Any other thoughts? Anyone?
 
Back
Top