Using an Add-In's Procedures

There are several ways to use the procedures in an add-in. By understanding the advantages and disadvantages of each technique, you can choose the method that's best suited to your work.

Technique

Advantages

Disadvantages

Use the Open command (File menu) or the Open method in Visual Basic to open the add-in.

This is the simplest way to load an add-in. Custom worksheet functions in the add-in can be typed into a worksheet, and the add-in can modify the user interface by using the Auto_Open procedure.

Visual Basic procedures in the add-in aren't available to other workbooks, even though functions in the add-in are available to worksheets in other workbooks. In addition, all add-in resources are loaded into memory, whether or not they're required.

Use the References dialog box (Tools menu) to create a reference to the add-in.

Visual Basic procedures in the add-in are available to other workbooks. Custom worksheet functions in the add-in are available to worksheets in other workbooks.

No auto procedure (for example, auto_open) runs when the reference is created. In addition, there is no reliable way to create a reference using Visual Basic code.

Use the Add-Ins dialog box (Tools menu) to install the add-in.

Microsoft Excel stores the location of the add-in in the system registry and can automatically load the add-in on startup.

Visual Basic procedures in the add-in aren't available to other workbooks, even though functions in the add-in are available to worksheets in other workbooks.


Placing the add-in the Xlstart folder (so that Microsoft Excel opens the add-in when it starts) results in the same behavior as opening the add-in any other way. Remember that Visual Basic procedures in the add-in aren't available to any other workbook unless you create a reference to the add-in using the References dialog box (Tools menu).