Hi! I need help filling out the form for task scheduler.
Goal: have a macro run everyday at the same time - file name c:\Script.xlsm
My macro runs perfectly.
I have a run.bat file
and a Script.vbs file.
It runs the macro if I click on the run.bat file.
run.bat code: cscript script.vbs "C:\script.xlsm"
Script.vbs code:
Dim args, objExcel
Set args = WScript.Arguments
Set objExcel = CreateObject("Excel.Application")
objExcel.Workbooks.Open args(0)
objExcel.Visible = True
objExcel.Run "test"
objExcel.ActiveWorkbook.Save
objExcel.ActiveWorkbook.Close(0)
objExcel.Quit
So all the parts seem to be working, but I can't get the task scheduler to work. It opens the excel file but doesn't run the macro.
could someone please tell me how to fill out this form?
picture attached. taskscheduler.jpg
Thanks!
Bookmarks