Unanswered: Problem creating Excel instance
(Apologies if this is in the wrong place, but it seemed like the best fit.)
We use the following applications for various tasks:
- Lotus Notes 6.0.3
- Excel 2000
- Essbase 126.96.36.199
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.
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
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.
Set xlApp = CreateObject("Excel.application")
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:
On my PC this works; on upgraded PCs it throws the C++ error again. However, this time VBA gave me an error message:
'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
strText = Selection.Text
strText = Left(strText, Len(strText) - 1)
Set objExcel = CreateObject("Excel.Application.9")
Set objWBook = objExcel.ActiveWorkBook
Set objSheet = objWBook.ActiveSheet
objSheet.Cells(1, 1).Value = strText
objExcel.Visible = True
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!
Run-time error '-2147417846 (8001010a)':
The message filter indicated that the application is busy.
Does anyone have any ideas?
10% of magic is knowing something that no-one else does. The rest is misdirection.