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?