--------------------------------------------------
Excel-DNA is now registered on GitHub Sponsors.
You can add Excel-DNA support with easy billing through a corporate GitHub account.
--------------------------------------------------
Hi Steve,
If you just want to access some classes in your Excel-DNA add-in from VBA, then you can do it much more simply without making the extra COM Excel add-in.
For this case, you can work through the example here:
Samples/ComServer at master · Excel-DNA/Samples (github.com)
Basically you don’t need any of the COM add-in stuff.
If, for some other reason, you really want the extra COM add-in involved, you need to get to it from VBA like this:
Set func = Application.COMAddIns(1).Object
Set result = func.GetDataPair("asd", 42)
Debug.Print result.Label
So you have to find the right COM add-in in the COMAddIns collection, and then the “.Object” property that you set in the add-in can be read and used here.
Let me know if you need more help on this.
-Govert
--
You received this message because you are subscribed to the Google Groups "Excel-DNA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to exceldna+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/4bd6ee4a-731e-4157-982c-998815f24853n%40googlegroups.com.
The COMAddIn object only has a single ‘Object’ property, so that would not give a directly way to pass multiple objects to VBA.
I suggest you take the other approach of using the COM classes directly, as in the example I linked to.
To view this discussion on the web visit https://groups.google.com/d/msgid/exceldna/be40c25c-9fa5-4020-a33a-234c6731e6aen%40googlegroups.com.