Fix Excel Add-In Reference Disappearing After Reopening Workbook
Question details
The user needs to prevent custom Excel add-in references from disappearing every time a workbook is closed and reopened.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Setting up VBA project references to custom Excel add-ins (XLAM) in a workbook.
- Observed behavior
- The established reference to a custom Excel add-in drops or disappears upon reopening the workbook unless a code module is added to the VBA project.
Ensure you are saving your dependent workbook in a macro-enabled format (like .xlsm or .xlsb), as standard .xlsx workbooks will automatically drop any embedded VBA projects and references upon saving.
Add a Code Module and Save as a Macro-Enabled Workbook
To make a custom VBA reference persist, the dependent workbook must have an active code module inside the VBA editor and be saved correctly.
Excel is designed to drop VBA references in completely empty VBA projects or standard .xlsx files to prevent unnecessary overhead. By adding at least one module (even if you leave it completely empty) and saving the file as macro-enabled, the reference to your XLAM add-in will be permanently retained.
Press Alt + F11 on your keyboard to open the Visual Basic for Applications (VBA) editor within your Excel application.
In the Project Explorer pane on the left side, right-click your target workbook's project, hover over 'Insert', and select 'Module'. You can leave this newly created module completely blank.
Go to the top menu bar, click 'Tools' > 'References', click the 'Browse' button, and navigate to select your custom .xlam add-in file. Click 'OK' to apply.
Close the VBA editor to return to your Excel workbook. Click 'File' > 'Save As', and ensure you choose 'Excel Macro-Enabled Workbook (*.xlsm)' from the format dropdown menu.

Create and Manage Macro-Enabled Workbooks in WPS Spreadsheets
WPS Office provides highly compatible support for VBA macros and macro-enabled workbooks (.xlsm), offering a smooth environment for developing and managing your custom add-ins and scripts.
- 1. Enable Developer Tools: Open WPS Spreadsheets, navigate to the 'Options' menu, and ensure the Developer tab is enabled to access the necessary VBA ribbon features.
- 2. Insert a Module in WPS VBA Editor: Click on 'Developer' > 'Visual Basic', right-click your active project in the project explorer, and insert a new Module to keep your references active.
- 3. Save as XLSM: Click 'Menu' > 'Save As' and select 'WPS Spreadsheets Macro-Enabled Workbook (*.xlsm)' to securely retain your add-in references and VBA code.

Frequently Asked Questions
Why does my Excel Add-in disappear from the ribbon?
If your add-in is not saved in a trusted directory or if your macro security settings block it, Excel may automatically disable the add-in upon startup. You can fix this by adding the add-in's folder to Excel's Trusted Locations via the Trust Center.
Can I save VBA macros in a standard .xlsx file?
No, standard .xlsx files cannot store VBA projects, macros, or custom add-in references. You must save your document as a macro-enabled workbook (.xlsm) or a binary workbook (.xlsb) to retain these elements.
What is an XLAM file used for in Excel?
An XLAM file is a specific Excel Add-In format containing macros and custom VBA functions. It is designed to be loaded silently in the background so its functions and scripts are available across multiple workbooks without displaying visible worksheets.




