If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Problem creating Excel instance

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-08-11, 11:09
weejas weejas is offline
Registered User
 
Join Date: Sep 2006
Location: Surrey, UK
Posts: 448
Problem creating Excel instance

Hi All!
(Apologies if this is in the wrong place, but it seemed like the best fit.)

The setup
We use the following applications for various tasks:
  • Lotus Notes 6.0.3
  • Excel 2000
  • Essbase 6.5.4.2
Not all at the same time, I hasten to add!

One of our Notes applications uses Automation to create and format an Excel worksheet, and then export data to it for printing and filing purposes. It's been working perfectly since 2004.

The problem
Recently, we began upgrading to Essbase 9.3.1. For users who have received the upgrade, the automation no longer works. Instead a message box with a big stop sign appears, titled "Microsoft Visual C++ Error", bearing the message that it cannot create an automation object. When I step through the Lotus Script code (think VBA that tastes like Notes), the line that falls victim to the error is
Code:
Set xlApp = CreateObject("Excel.application")
I have tried explicitly setting xlApp to Nothing before assigning it the application object, and I have tried changing the argument to "Excel.Application.9". Neither of these help.

To make sure that it's not Notes futzing with me (again), I created a Word document that uses the following code to output to Excel:
Code:
Sub AutomationTest()
    '2011-Apr-08
    'Use Automation to create an Excel object and output the text in the document to the first cell.
    
    Dim objExcel As Object
    Dim objWBook As Object
    Dim objSheet As Object
    Dim strText As String
    
    Application.ActiveDocument.Paragraphs(1).Range.Select
    strText = Selection.Text
    strText = Left(strText, Len(strText) - 1)
    
    Set objExcel = CreateObject("Excel.Application.9")
    objExcel.Workbooks.Add
    Set objWBook = objExcel.ActiveWorkBook
    Set objSheet = objWBook.ActiveSheet
    
    objSheet.Cells(1, 1).Value = strText
    objExcel.Visible = True
End Sub
On my PC this works; on upgraded PCs it throws the C++ error again. However, this time VBA gave me an error message:
Quote:
Run-time error '-2147417846 (8001010a)':

Automation error
The message filter indicated that the application is busy.
My colleague who understands Essbase tells me that the part of the installation includes an add-in for Excel and supporting files. However, we are both at a loss as to how this could interfere with opening an instance of Excel!

Does anyone have any ideas?
__________________
10% of magic is knowing something that no-one else does. The rest is misdirection.
Reply With Quote
  #2 (permalink)  
Old 04-08-11, 18:27
Colin Legg Colin Legg is offline
Registered User
 
Join Date: Sep 2008
Location: London, UK
Posts: 495
There's a known bug which gives this error as a result of having Norton Antivirus, but I couldn't find anything in relation to Essbase.

The automation error 8001010A occurs when you automate Word 2000

I think the first thing to try would be to manually disable all add-ins (including COM add-ins) on a problem PC and then testing to see if the problem persists? If it then runs without a problem, enable each add-in one at a time until you get an error: then you'll know which one is causing the problem.
__________________
Colin

RAD Excel Blog

Other tutorials:
Array Formulas | Deleting Rows with VBA
Reply With Quote
  #3 (permalink)  
Old 04-09-11, 01:19
weejas weejas is offline
Registered User
 
Join Date: Sep 2006
Location: Surrey, UK
Posts: 448
Quote:
...disable all add-ins...
*Kicks self*
I'm now very embarrassed at not remembering to try that myself. Especially given that it was a work-around for another Automation process that failed!

I suppose that if push comes to shove, I can add a Messagebox statement that instructs users to disable the Essbase add-ins before continuing.

Thank you!
__________________
10% of magic is knowing something that no-one else does. The rest is misdirection.
Reply With Quote
  #4 (permalink)  
Old 04-11-11, 09:01
weejas weejas is offline
Registered User
 
Join Date: Sep 2006
Location: Surrey, UK
Posts: 448
Deactivating the add-in didn't help.

We've tried a few things on my PC - fully installing version 9 of Essbase broke the automation, and installing version 9 while retaining the version 6 client broke the automation and Essbase.

It is entirely possible that were we using Excel 2003 or above, this would not be an issue. However, that is a decision that happens far, far above my pay grade.
__________________
10% of magic is knowing something that no-one else does. The rest is misdirection.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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