Problem running a probram using SQL 2000 Job Scheduler

  • Thread starter Thread starter Steven N
  • Start date Start date
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
 
Hi Steven,

What type of error do you get, and what is the # and description of that
error message?

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]
 
(e-mail address removed) (Steven N) wrote ...
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.

Does anyone have any idea where to start solving this problem?

Have you tried the vendor of the ActiveX control?

Jamie.

--
 
Back
Top