Use XLL UDFs in an other XLL add-in

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

Use XLL UDFs in an other XLL add-in
Use XLL UDFs in an other XLL add-in, how to set a reference 
Henri Pellemans

Posts: 110
Joined: 2010-05-06
Hi at ADX,

I read this forum topic, but I still don’t know how to use UDFs from one XLL add-in in another XLL add-in. I still use VS2010 with the most recent ADX. Let me give you an example.

XLL Add-in Tax has a UDF = incomeTax.

XLL Add-in Finace has a UDF = netIncome = income – incomeTax

I want to reuse the UDF incomeTax from the Tax XLL Module in the Finance XLL Module.

In Finance I set a reference to Tax.dll (did not know whether to use the DLL file from the obj folder or the bin folder). In the XLLModule of Finance I imported Tax.XLLModule1.

This seemed to work for a few minutes, but after I imported the XLLModule from third XLL Add-in I did not see the UDFs anymore. I deleted the projects and started again with the Tax add-in and the Finance add-in, but I still was not able the use the UDFs from the Tax add-in. Which is peculiar, because before it was working well.

Any idea how to fixed this? To avoid misunderstanding, I don’t want to create a separate DLL file in VB.NET, I just want to reuse the DLL in which the ADX UDFs are stored.

Could there be a problem if a XLL add-in has AdditionalXLLModules or when the XLLModules are renamed (e.g. called incomeTaxFunctions or corporateTaxFunctions).

Best regards,

Posted 09 May, 2019 02:30:50 Top
Andrei Smolin

Add-in Express team

Posts: 17178
Joined: 2006-05-11
Hello Henri,

To use the same code in different add-ins, you need to create a class library (DLL) containing that code, and reference that DLL from the add-ins.

Henri Pellemans writes:
In the XLLModule of Finance I imported Tax.XLLModule1.

How do you do this?

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 09 May, 2019 08:23:19 Top