View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Matthew Wieder[_3_] Matthew Wieder[_3_] is offline
external usenet poster
 
Posts: 30
Default REPOST: Calling Excel Automation Add-In in VBA

That is creating a new instance of the COM object - not getting a
refernce to the AddIns instance. By way of illustration, we have a
worksheet function that takes some params and makes a connection to a
database. We want to expose that connection to VBA through a method in
the add-in. Creating another instance of the COM object obviously would
have no knoweldge of that conenction created by the sheet.

keepITcool wrote:
Is it a problem to set a reference to the dll in your projects?
I've built an automation addin in vb6 (with Function Wizard
descriptions) that I can reference without problems, albeit with a
small detour

Sub AutomAddinTest()
Dim udf As UDFdemo.Functions
Set udf = New UDFdemo.Functions
debug.print = udf.UDFtest(Empty, Empty, Empty)

End Sub