How to Save Excel Workbooks as Macro-Free XLSX Files
Question details
The user wants to save multiple macro-enabled workbooks as macro-free .xlsx files without having to manually change the file type or lose required VBA functionality.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Saving workbooks containing VBA macros to a standard file format without triggering constant compatibility warnings.
- Observed behavior
- Excel displays a warning that VBA content cannot be saved in the macro-free .xlsx format, requiring the user to manually change the format to .xlsm or permanently remove the macros.
Determine if you actually need to keep the VBA macros in your final document. Standard .xlsx files strictly forbid macro code for security reasons; if the macros are required for future use, you must use the .xlsm format.
Save as Macro-Enabled (XLSM) or Remove Macros
This is the standard resolution for handling workbooks that contain VBA code. You must choose between retaining the macros in a compatible format or stripping them out to use the standard XLSX format.
By design, Microsoft Office restricts the standard .xlsx file format from containing any executable VBA macro code. This is a built-in security measure.
If you attempt to save a macro-enabled workbook as an .xlsx file, Excel will prompt a warning. You must either save it as an .xlsm file to preserve functionality or intentionally remove the VBA code.
To keep your macros, go to File > Save As. In the 'Save as type' dropdown menu, select 'Excel Macro-Enabled Workbook (*.xlsm)' and click Save.
To remove the macros and proceed with a standard file, click 'Yes' when Excel asks if you want to continue saving as a macro-free workbook. The VBA code will be permanently deleted from the new .xlsx file.

Troubleshoot Unexpected Macro Warnings
Use this solution if Excel incorrectly retains macro content warnings on completely blank files or behaves unexpectedly when saving standard documents.
Seamlessly Manage Your Spreadsheets with WPS Office
Since the limitation of saving macros in .xlsx files is tied to standard OOXML file format rules, dealing with constant save prompts in Microsoft Office can be tedious. WPS Office provides a lightweight, highly compatible, and free alternative that handles all standard Excel formats seamlessly.
- 1. Download and Install: Download WPS Office for free from the official website and run the quick installation.
- 2. Open Your Workbooks: Open your existing .xlsx or .xlsm files directly in WPS Spreadsheet without worrying about formatting loss.
- 3. Save with Ease: Easily manage your VBA scripts and save your workbooks in the exact format you require using the intuitive File menu.

Frequently Asked Questions
Why does Excel say features cannot be saved in macro-free workbooks?
This warning appears because your current workbook contains VBA (Visual Basic for Applications) macros. The standard .xlsx file format is deliberately designed to not support macro code to protect users from malicious scripts. You must use .xlsm to save macros.
What happens if I click 'Yes' to save as a macro-free workbook?
If you click 'Yes', Excel will proceed to save the file as an .xlsx document, but it will permanently delete all VBA macro code from the file. You will not be able to run those macros the next time you open the workbook.
Is it safe to delete the Excel Options registry key?
Yes, provided you delete only the specific 'Options' key related to Excel and you have backed it up first. When you restart Excel, it will automatically regenerate this key with factory default settings, which often resolves unexpected background behaviors.
Can I automatically save all files as .xlsm?
Yes. You can change your default save format by going to File > Options > Save. Under the 'Save workbooks' section, change the 'Save files in this format' dropdown to 'Excel Macro-Enabled Workbook (*.xlsm)'.




