I tried to call Application.RegisterXLL to load my own xll in excel 2013, but it failed with returning false. I have checked Macro and Add-ins Settings but have no effect. Is there any way to get more detailed error description? The code is as following.
mypath = Application.ActiveWorkbook.Path
rs = mypath + "\AddIn.xll"
rc = Application.RegisterXLL(rs)
Any help or insight would be greatly appreciated. Thanks!
If your xll is dependent of external dlls , you need to change the current directory to the xll folder before to call
Application.RegisterXll
.Also be sure to put all your dependencies in the same folder as your xll.
See also this answer.