Assume I have a .Net library with a class(TestClass) with a function 'Add'. I am accessing this in Excel by writing a VBA addin. I want to know the difference between the following two ways of accessing FUN1.
Add the tlb as reference and use New as in
Dim obj = New MyLibrary.TestClass
returnval = obj.Add(5,5)
Regasm that .Net dll and use Run method as in
returnVal = Run("Add", 5, 5);
I have a lot of code where I see this similar way of accessing a function and am really confused how this works.
How does 2 work, will it work or what is neccesary to make 2 work like this.