Installing An Add-In
This page describes how to install an XLA Add-In for Excel.
If you have downloaded or otherwise acquired an XLA Add-In, you must install it so that Excel is aware of its existence and can
load the add-in as necessary to access the functions and tools provided by the Add-In.
In general usage when speaking of XLA Add-Ins, the term install means to add the Add-In to Excel's list of known add-ins.
Typically this is done only once, when you first acquire an Add-In and add it to your machine. The term load means
to actually open the Add-In and make its functionality available. Loading an Add-In is essentailly the same as opening
a workbook. The file is opened and loaded into memory. Confusingly, VBA uses the term Installed to mean what is
generally meant by loaded.
In a typical Office/Excel installation, Excel will expect Add-Ins to be placed in either of two locations. These locations vary
depending on the version of Excel and the version of Windows, but are accessible via the Application.LibraryPath
and Application.UserLibraryPath properties. On my current machine, running Windows Vista Ultimate and
Office 2007 Ultimate, these paths are:
LibraryPath: C:\Program Files\Office 2007\Office12\LIBRARY
UserLibraryPath: C:\Users\Pearson\AppData\Roaming\Microsoft\AddIns
To see the values of these properties on your machine, run the following
code:
Sub ShowLibraryPaths()
MsgBox "Library Path: " & Application.LibraryPath & vbCrLf & _
"User Library Path: " & Application.UserLibraryPath, vbOKOnly
End Sub
It is not required, however, that an Add-In reside in one of those folders. An Add-In may be placed anywhere in any folder
on your machine. Once you have placed the file in the appropriate folder, go to the Tools menu and choose
Add-Ins.... (In Excel 2007, click the Office button, choose Excel Options then select the Add Ins
screen, choose Excel Add-Ins in the Manage input box and click Go.) In the Add-Ins dialog, click the
Browse button. This will open a familiar Open File dialog. Navigate to the folder in which you saved the XLA Add-In
file, select that file, and click Open. This will install the Add-In. Generally, you need to do this only one time, the
first time you use the Add-In.
To install an Add-In using VBA code, use code like the following:
Sub InstallAddIn()
Dim AI As Excel.AddIn
Set AI = Application.AddIns.Add(Filename:="C:\MyAddIn.xla")
AI.Installed = True
End Sub
After an Add-In has been installed, it must be loaded in order to access its functions and tools. Open the Add-Ins dialog as
described above and locate the Add-In in the list. Note that Add-Ins are listed in the dialog box by the text that was
assigned for the Title property of the workbook when it was created, not by disk file name. Select the Add-In and check the
box next to it and click OK. To unload an Add-In, do the same thing but uncheck the box next to the Add-In item.
To load or unload an Add-In using VBA code, use code like the following:
Sub InstallAddIn()
Application.AddIns("AddIn Displayed Name").Installed = True
End Sub
Removing an existing Add-In consists of two steps: (1) Deleting the actual XLA file, and (2) removing the Add-In from the list
of add-ins. Close Excel and then delete the actual XLA file from disk. Next, open Excel, go to the Tools menu, choose
Add-Ins and attempt to load deleted add-in. Excel will prompt you with a message Cannot find add-in: filename.xla.
Delete from list?. Click Yes to delete the Add-In from Excel's list of available add-ins.
This page last updated: 6-October-2007