S
Steven N
I purchased an ActiveX Control to include in my program. This program
and control works great from the command line, but when scheduling it
using the SQL 2000 Job Scheduler, the program does not execute
correctly. The following is the section of code which fails when
running via the SQL-2000 Job Scheduler. I would suspect there is a
permissions problem, but I am at a loss.
If (CreateExcelApp1 = False) Then ' Can't create Excel???
OpenXLSSaveAs = -3
MsgBox ("Unable to create Excel Application. Is it installed?")
Exit Function
End If
...snip...
Public Function CreateExcelApp1() As Boolean
On Error GoTo CreateExcelApp1_Failure
If (bExcelApp1Exists = True) Then
CreateExcelApp1 = True
Exit Function
End If
Set XLApp1 = New Excel.Application
XLApp1.Application.DisplayAlerts = False
XLApp1.EnableEvents = False
XLApp1.Visible = False
XLApp1.Application.DisplayAlerts = False
XLApp1.AskToUpdateLinks = False
XLApp1.AlertBeforeOverwriting = False
XLApp1.PromptForSummaryInfo = False
CreateExcelApp1 = True
bExcelApp1Exists = True
Exit Function
CreateExcelApp1_Failure:
bExcelApp1Exists = False
CreateExcelApp1 = False
End Function
Does anyone have any idea where to start solving this problem?
Thanks in advance
and control works great from the command line, but when scheduling it
using the SQL 2000 Job Scheduler, the program does not execute
correctly. The following is the section of code which fails when
running via the SQL-2000 Job Scheduler. I would suspect there is a
permissions problem, but I am at a loss.
If (CreateExcelApp1 = False) Then ' Can't create Excel???
OpenXLSSaveAs = -3
MsgBox ("Unable to create Excel Application. Is it installed?")
Exit Function
End If
...snip...
Public Function CreateExcelApp1() As Boolean
On Error GoTo CreateExcelApp1_Failure
If (bExcelApp1Exists = True) Then
CreateExcelApp1 = True
Exit Function
End If
Set XLApp1 = New Excel.Application
XLApp1.Application.DisplayAlerts = False
XLApp1.EnableEvents = False
XLApp1.Visible = False
XLApp1.Application.DisplayAlerts = False
XLApp1.AskToUpdateLinks = False
XLApp1.AlertBeforeOverwriting = False
XLApp1.PromptForSummaryInfo = False
CreateExcelApp1 = True
bExcelApp1Exists = True
Exit Function
CreateExcelApp1_Failure:
bExcelApp1Exists = False
CreateExcelApp1 = False
End Function
Does anyone have any idea where to start solving this problem?
Thanks in advance