Shared Excel addin can't work on excel 2002


C

Carlos

I have created an excel add-in using vs2005 (a shared add-in project) for
Excel 2003(sp3) on my machine and it works normally. But it doesn't work on
another computer which has Excel 2002(sp3) on it after I installed the Excel
addin using the setup file.

I have found that the problem is caused by the following codes:

<GuidAttribute("xxx"), ProgIdAttribute("xxx")> _
Public Class Connect
Implements Extensibility.IDTExtensibility2

Dim applicationObject as Object
Dim addInInstance as object

Dim WithEvents oXL As Excel.Application

Public Sub OnConnection(ByVal application As Object, ByVal connectMode As
Extensibility.ext_ConnectMode, ByVal addInInst As Object, ByRef custom As
System.Array) Implements Extensibility.IDTExtensibility2.OnConnection
applicationObject = application
addInInstance = addInInst
Try
oXL = application
...
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
....
....
End class

There is an exception when execute the line: oXL = application
and here is the detail error info:
 
Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top