Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Problem running a probram using SQL 2000 Job Scheduler

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_Failu
bExcelApp1Exists = False
CreateExcelApp1 = False
End Function

Does anyone have any idea where to start solving this problem?
Thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default Problem running a probram using SQL 2000 Job Scheduler

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]


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. 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_Failu
bExcelApp1Exists = False
CreateExcelApp1 = False
End Function

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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Running excel macro by scheduler Dan Excel Discussion (Misc queries) 1 August 19th 07 11:48 PM
Excel xp running with Office 2000 kyoung Excel Discussion (Misc queries) 5 April 10th 05 12:11 PM
Excel Object in VB when running under scheduler control Peter Hoyler Excel Programming 2 December 17th 03 12:54 PM
Running a Excel Macro from Windows Scheduler haisat[_6_] Excel Programming 3 November 7th 03 09:54 AM
Excel 2002 / XP - Running .XLS with Macros via Task Scheduler James Cox Excel Programming 0 August 19th 03 03:50 AM


All times are GMT +1. The time now is 10:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"