Hi I am new to DTS and I am having a lot of trouble when I try to schedule the below report. Can someone point me in the right direction? I have posted a snippet of the code as well as the error. Please note that this runs fine when I execute it, its just when I schedule it, it doesn't run. TIA. -C
VB Script CodePublic Sub InitializeReport()
Dim xlApplication
Dim xlWorkBook
Dim xlWorkSheet
Set xlApplication = CreateObject("Excel.Application")
Set xlWorkBook = xlApplication.WorkBooks.Add
xlApplication.DisplayAlerts = False
Set xlWorkSheet = xlWorkBook.Worksheets.Add
xlWorkSheet.Activate
This is the error:Executed as user: MKHE\sql. ...SRun OnStart: DTSStep_DTSActiveScriptTask_1 DTSRun OnError: DTSStep_DTSActiveScriptTask_1, Error = -2147220482 (800403FE) Error string: Error Code: 0 Error Source= Microsoft VBScript runtime error Error Description: ActiveX component can't create object: 'Excel.Application' Error on Line 24 Error source: Microsoft Data Transformation Services (DTS) Package Help file: sqldts80.hlp Help context: 4500 Error Detail Records: Error: -2147220482 (800403FE); Provider Error: 0 (0) Error string: Error Code: 0 Error Source= Microsoft VBScript runtime error Error Description: ActiveX component can't create object: 'Excel.Application' Error on Line 24 Error source: Microsoft Data Transformation Services (DTS) Package Help file: sqldts80.hlp Help context: 4500 DTSRun OnFinish: DTSStep_DTSActiveScriptTask_1 Error: -2147220440 (80040428); Provider Erro... Process Exit Code 1. The step failed.