Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2006
    Location
    Surrey, UK
    Posts
    994
    Provided Answers: 2

    Unanswered: 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:
    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.

  2. #2
    Join Date
    Sep 2008
    Location
    London, UK
    Posts
    511
    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.

  3. #3
    Join Date
    Sep 2006
    Location
    Surrey, UK
    Posts
    994
    Provided Answers: 2
    ...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.

  4. #4
    Join Date
    Sep 2006
    Location
    Surrey, UK
    Posts
    994
    Provided Answers: 2
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •