I have a 3rd party XLL addin I'd like to wrap in my own custom vba function. How would I call the 3rd party function from my code?
Thanks
I have a 3rd party XLL addin I'd like to wrap in my own custom vba function. How would I call the 3rd party function from my code?
Thanks
I know this is a way late answer, but I discovered this alternate method and think it's worth sharing. You can declare the 3rd party functions in the same manner as a Win32 call. This has the added benefit of showing up in the Intellisense completion when you are coding.
Edit: There are at least two ways to do this:
Option 1:
Application.Run(...)
This looks like the best way to go about it, since your arguments are automatically converted to an appropriate type before being sent to the XLL function.
See this page for more details.
Option 2:
Application.ExecuteExcel4Macro(...)
With this method, you will have to convert any arguments into string format before passing them to the XLL function.
See this page for more details.