Use function in Excel from Shared-AddIn (VB) problem

M

Marcus Mängel

Hi,

I created a Shared-AddIn for Excel with VB. Everythings works fine except
that I cannot access a function from the AddIn via ExcelVBA.
What needs to be done to get access.

Thanks in advance

Marcus
 
M

Marco Wassink

Hello Marcus,

is it an addin created in vb6 and did you put it in a class?

regards Marco
 
M

Marcus Mängel

I found this solution:
Insert the following code in the onConnection sub in the AddIn
Microsoft.VisualBasic.Interaction.CallByName(addInInst, "Object",
CallType.Let, Me)

and call it from VBA via
Dim oAdd As Object
Set oAdd = Application.COMAddIns("Addin.Connect").Object
xxx = oAdd.Function(X)

Marcus
 
Top