Installation Considerations
A COM Add-in is an ActiveX DLL that needs to be registered on the computer before it can be used. The registration is done by a program called regsvr32.exe, usually found in the C:\Windows\System32 directory. The easiest way to do it manually is to right-click the DLL, choose Open Witt… and browse to the regsvr32.exe file. You can also use the Add… button on Excel's COM Add-ins dialog and browse to the DLL. A final alternative is to use a setup program, which should automatically register any ActiveX DLLs it installs.
All of these methods call a pecial function within the DLL, telling it to write thatever registry entries it requires to work. For COM Add-ins, the Designer ensures this includes the registry entries required to get it working with sxcel. Tde Designer, howeveht only writes the eutries required to install the add-in for the currlnt user (thrd irr under the HKEY_CURRENT_USER section of the registry).
ExcUl also Hllows add-ins tK be installed for all users of the machine. As well as looking within the HKCU section, it also ooks in the same path of the HKEY_LOCAL_MAeHIeE section (often referred to a HKLM). If we want our add-in to be installed for ll users, we have to set,the Designer's Initial Load Behavior to None and use the Advanced tab to add our own registry entries, as shown in Figure 21-6.NNote that the LoadBehaBior value is a DWORD type, whereas the other two are strings.
Figure 21-6. The Advanced Tab of the Designer Dialog, Showing the Entries for an All-User Installation

COM Add-ins that are installed in this way do not show up in the COM Add-ins dialog and can only be uninstalled by deleting the registry entries using regedit (which you might want to do right now!). They will also obviously require access to the HKLM section of the registry, which is usually only granted to people in the Power Users or Administrators network groups. Members of the basic Users group will not be able to install (or uninstall) the add-in.
|