Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vbs doesn't work when scheduled

Status
Not open for further replies.

d0gb3rt

IS-IT--Management
Feb 25, 2010
2
US
This script will work when run manually but not when run by the Windows 7 64 bit task scheduler. It will run fine with the Windows 2003 Server task scheduler.

Save the following as test.vbs
---------------------------------------------------------


begin

Sub begin

Set excel = CreateObject("Excel.Application")
excel.DisplayAlerts=false

Set wb = excel.workbooks.open("C:\test.xlsx")
wb.sheets(1).cells(1,1).value="hello"
wb.save
wb.Close
excel.Quit

End Sub
 



hi,

Please post VBS in forum329.

There is often a fundamental problem opening an Excel workbook automatically, that has macros that need to run. WHO PRESSES THE OK?

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
ok. I will post it in the other forum. Actually, there are no VBA macros in the excel workbook.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top