Unregister a XLL in Excel (VBA)

左心房为你撑大大i 提交于 2019-12-10 02:48:53

问题


I am just discovering the world of programming XLLs for Excel using XLW under Visual C++ 2010 and everything has been smooth so far using the template provided with the XLW package, I have a few questions:

  1. I found out that I can register an XLL by double-clicking it. What other ways are there, especially from VBA or the Excel menu?
  2. How can I unregister an XLL, both via the Excel GUI and VBA? I assume this has to be done each time I rebuild the Xll under Visual Studio.
  3. Does Excel 2010 64-bit require XLLs compiled and linked for 64-bit?

Thanks, Steve


回答1:


I usually use below as I have to loan/unload xla multiple times during excel session. Let me know if it works for you:

AddIns.Add Filename:= "C:\test\1.XLL"
AddIns("Pricer Add-In").Installed = False

AddIns.Add Filename:= "C:\test\Arbitrage.XLL"
AddIns("Pricer Add-In").Installed = True

you have to make sure that filepath and name of the addin match. To check the name of the addin, go to Tools -> Addin.

you can also use "Record Macro" feature and start recording and disable/enable the addin/xll from Tools -> Addin. Good luck




回答2:


Adding a bit to the above answer.

1) You can register a dll in Tools/Addins in versions before 2007, after 2007 you need to press addins from the developer tab or go to the Add-Ins tab on the Excel options page and press Go after Manage - Excel Add-ins. From either of those places you can browse to a file and that will automatically register it.

2) as above, unselecting the check box unloads the add-in from excel. You do not need to reregister each time you build as long as the dll is in the same place.

3) Yes any 64 bit xlls must be compiled for 64 bit



来源:https://stackoverflow.com/questions/5616732/unregister-a-xll-in-excel-vba

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!