Accessing .NET Module Class directly within VBA

Add-in Express™ Support Service
That's what is more important than anything else

Accessing .NET Module Class directly within VBA
ex : set MyAddin.MyMethod and not "=MyMethod()" 
Effisoft Effisoft




Posts: 5
Joined: 2010-10-11
Hi,

is it possible to expose a .NET class with intelisense in a VBA module ?

it would something like :


sub test


result = MyAddin.MyMethod(10,20)

and not

ActiveCell.FormulaR1C1 = \\"=MyMethod()

end sub



tks for your response
Posted 12 Oct, 2010 10:42:39 Top
Sergey Grischenko


Add-in Express team


Posts: 7187
Joined: 2004-07-05
No. You can access the add-in via the COMAddins collection only.
Posted 12 Oct, 2010 10:55:29 Top
Effisoft Effisoft




Posts: 5
Joined: 2010-10-11
ok, i understand.

So how can you do that because i have tried :

ExcelApp.COMAddIns.Item("MyProject.ExcelAddinModule")

But it did not work, i could not get the handle of my Addin.

What is the best way to get this addin handle of the running addin instance ?
Posted 12 Oct, 2010 11:00:28 Top
Sergey Grischenko


Add-in Express team


Posts: 7187
Joined: 2004-07-05
You can access COM Add-ins only. Excel Automation Add-ins are not accessible from the COMAddins collection. Please try to use the Evaluate function of the Excel object model. It
allows you to call Excel UDFs.
Posted 12 Oct, 2010 11:34:59 Top