Maintaining References to Other Add-Ins

If an add-in's source workbook contains a reference to another add-in — for instance, a reference to Xlodbc.xla — make sure that when you distribute the add-ins, the referenced add-in is stored somewhere on the user's machine where the calling add-in can find it. When you compile a source workbook to an add-in, Microsoft Excel stores a hard-coded path to the referenced add-in in the calling add-in. If you move the calling add-in to another computer (when you distribute the add-in to your users, for example), and if Microsoft Excel cannot find the file in the hard-coded location, it searches in the following locations (in this order):

If you experiment with the resolution algorithm, you'll also notice that after Microsoft Excel has reestablished the reference, it will keep it even if you move the referenced add-in somewhere outside the locations described in the preceding list. When you restart Microsoft Excel, however, the reference will be unresolved again.

To be safe, always store a referenced add-in in the folder that contains the calling add-in. A less advisable but still relatively safe method is to store the referenced add-in in a folder in the path.