I have a vbscript that runs an excel macro. Everything seems right, but it is not working as I had hoped. The task starts but then just continuously running without doing anything.
Let me show you everything I have... I don't get any errors, it just isn't running properly.
Task scheduler Timeline
- Event 110 Task Triggered by user (Task Scheduler launched "{6569c7af-fed8-456b-8c8e-9d1653b8c15a}" instance of task "\Test" for user "tsee".
- Event 319 Task engine received message to start task
- Event 100 Task started - Task Scheduler started "{6569c7af-fed8-456b-8c8e-9d1653b8c15a}" instance of the "\Test" task for user "METRO\tsee".
- Event 200 Action Started - Task Scheduler launched action "C:\Users\tsee\Desktop\vbsTest\runTest.vbs" in instance "{6569c7af-fed8-456b-8c8e-9d1653b8c15a}" of task "\Test".
- Event 129 Created Task Process - Task Scheduler launch task "\Test" , instance "C:\Windows\System32\WScript.exe" with process ID 8964.
After that it just says "running" and doesn't execute anything.
My VBScript: (runTest.vbs)
Dim xlApp
Dim xlBook
Set xlApp = CreateObject("Excel.Application")
Set xlBook = xlApp.Workbooks.Open("\\fileserver\homeshares\Tsee\My Documents\Programming\Task Scheduler\runTask.xlsm", 0, True)
xlApp.Run "runTaskTest"
xlBook.Close
xlApp.Quit
Set xlBook = Nothing
Set xlApp = Nothing
My excel Sheet and Macro: (runTask.xlsm)
Sub runTaskTest()
Dim erow As Long
erow = Cells(Rows.Count, "A").End(xlUp).Row
Cells(erow + 1, 1).FormulaR1C1 = "This test was successful : " & Now
ThisWorkbook.Save
End Sub
Any help would be much appreciated. Thanks in advance!
Path network: