|
-
Apr 4th, 2003, 01:50 PM
#1
Thread Starter
New Member
Excel CreateObject
In one of my projects, I am creating two instances ( one is public another is private within a Sub) of Excel 2000 Application:
Public xlPub As Excel.Application
Sub mySub()
' Exporting data to Excel Sheet
Dim xlApp As Excel.Application
Dim xlWbk As Excel.Workbook
Dim xlSht As Excel.Worksheet
...
Set xlApp = CreateObject("Excel.Application")
' Open an Excel Template file, XLT
Set xlWbk = xlApp.Workbooks.Open(App.Path & "\myReport.XLT")
Set xlSht = xlWbk.Sheets(1)
....
....
set xlApp = Nothing
End Sub
Program flow is as follows:
Set xlPub = CreateObject("Excel.Application")
' this object is never made visible. In fact it is there so I can
' use the "WorksheetFunction" function of xlPub object.
....
Call mySub
....
xlPub.Quit
set xlPub = Nothing
I have tested this on many computers and it worked fine. However on one particular computer, it created xlPub successfully but the call to CreateObject in mySub failed with Error 429.
Any ideas what could be wrong?
Thanx
-Atul.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|