Remove macros from Excel by dropping an .xlsm, .xltm or .xlam file on this page: it lists the VBA modules and Excel 4.0 macros inside, counts what will stop working without them, and gives you back a regular .xlsx with the rest of the workbook untouched. The usual case is a file leaving the building. A pricing model with a Refresh button is going to a client, or a supplier's order form arrives as .xlsm and you want the numbers without clicking Enable Content on a stranger's code.
How to remove macros from Excel with this tool
- Drop an .xlsm, .xltm, .xlam or .xlsx file of up to 50MB on the box, or click to browse. The workbook is read and converted in your browser, in a background worker, and never uploaded.
- Read what the page found. Each VBA module is listed with its name, its kind (standard module, class module, UserForm, or the code behind the workbook or a sheet) and its lines of code. A signed project is marked "digitally signed". Excel 4.0 macro sheets and names follow, then a yellow "What stops working" box.
- Click "Remove macros and save as .xlsx". An .xlsm with no macros in it shows "Convert to .xlsx" instead.
- Click "Download .xlsx".
report.xlsm downloads as report (xlsx.com).xlsx.
The result names what was done, for example "Removed the VBA project (2 modules) and 1 name using Excel 4.0 functions, turned the Excel 4.0 macro sheet into a worksheet and saved it as a regular .xlsx workbook". An .xlsx with no macros shows "No macros found" and offers no download.
The line counts leave out blank lines and the hidden Attribute lines that every module carries and the Visual Basic Editor never displays.
What gets removed and what stays
The tool does what Excel does when you save a macro-enabled workbook as Excel Workbook (.xlsx). The rules came from Excel for Mac: a workbook with an Excel 4.0 macro sheet, a GET.CELL name and an Auto_Open name was saved as .xlsx there, and the tool copies what Excel kept and dropped.
| In the workbook | After removal |
|---|
| VBA project: modules, class modules, UserForms, code behind the workbook and sheets | Deleted, along with its digital signature |
| Excel 4.0 macro sheet | Becomes an ordinary worksheet. Cells holding a formula are emptied; typed values stay |
| Defined names that call Excel 4.0 functions (GET.CELL, GET.WORKBOOK, EVALUATE and the like) | Deleted |
| Other defined names, Auto_Open included | Kept |
| File type | Changed to a plain workbook |
| Sheets, formulas, formatting, charts, pictures, notes, pivot tables | Exact same bytes as before |
Inside the file, only the list of content types and the workbook's relationships change, plus workbook.xml when a name is deleted and each macro sheet's own part when it's converted. If formula cells on a macro sheet go, calcChain.xml goes with them and Excel rebuilds it on open. Nothing is added: no properties, no branding inside the workbook, only the download name.
In the same Excel for Mac check, every converted file opened with no repair prompt and no macro warning. The originals all raised the macro warning: a real workbook with a VBA macro and a button, three workbooks Excel made with Excel 4.0 macro sheets, and the test file.
A lot of .xlsm files have no macros at all. Someone's default save format was macro-enabled, and every file they saved came out as .xlsm. For those the tool changes only the file type.
A macro-enabled template (.xltm) or add-in (.xlam) comes out as a regular workbook, not a template or an add-in. An add-in's sheets, hidden while it was an add-in, show up as ordinary sheets. The page tells you this before you click.
What stops working after you remove macros
Anything in the workbook that called the code stays in the file and fails when someone uses it. This is the part most guides to removing macros leave out, and it's why the page counts these before anything changes:
- Cells that call a VBA function. A custom function like
=COMMISSION(B2,C2) keeps its last result until Excel recalculates, then shows #NAME?. A formula filled down 400 rows counts as 400 cells.
- Cells that use a deleted Excel 4.0 name. Also #NAME? after recalculation. The classic case is a name like
FillColour defined as =GET.CELL(38,Sheet1!A2) to read a cell's colour into a formula.
- Buttons and shapes assigned to a macro. They stay on the sheet, and clicking one gives Excel's "Cannot run the macro" message.
- ActiveX controls. They stay, without the code that ran when someone used them.
- Custom ribbon buttons added by the workbook.
If the recipient needs the numbers those formulas produced, save a copy of the .xlsm under a new name and fix it there before you convert: select the cells, copy, and use Paste Special > Values. The #NAME? problem goes away because there's no formula left to recalculate.
Why Excel finds macros the VBA editor doesn't show
A workbook can contain macros while the Visual Basic Editor is empty. Excel 4.0 macros, also called XLM, are older than VBA, and Excel 365 still opens files that contain them. They live in two places: on a macro sheet, whose tab is often hidden, and in defined names that call Excel 4.0 functions such as GET.CELL, GET.WORKBOOK or EVALUATE.
Neither kind appears in the Visual Basic Editor, and the names never show up in the Macros list (Alt+F8) either. That's one answer when people ask why Excel calls a file macro-enabled, or keeps pushing them to save as .xlsm, when they can't find a single macro. The other is an empty VBA module left behind after its code was deleted, such as the Module1 a recorded macro creates: the page lists it, marked "no code" when it's empty. The names do appear in Formulas > Name Manager, if you know to look at the Refers To column.
The tool lists macro sheets and Excel 4.0 names alongside the VBA modules, then handles them as Excel's Save As does: the macro sheet becomes a worksheet with its formula cells emptied, and the names that call Excel 4.0 functions are deleted.
Renaming .xlsm to .xlsx doesn't remove anything
Changing the extension leaves the macros and the file's own macro-enabled type inside it. Excel then refuses to open the file, with "Excel cannot open the file 'report.xlsx' because the file format or file extension is not valid". This tool checks an .xlsx as well as an .xlsm, because a file can be macro-enabled inside whatever it's called, and converts a renamed one properly.
Remove macros in Excel without this tool
If you have Excel and trust the file, Save As gives the same result. In Excel for Windows, go to File > Save As (or Save a Copy when AutoSave is on), pick Excel Workbook (*.xlsx) under Save as type, click Save, and answer Yes to "The following features cannot be saved in macro-free workbooks: VB project". On a Mac, choose Excel Workbook (.xlsx) in the File Format list.
To remove only some macros, open the Visual Basic Editor with Alt+F11, find the module in the Project Explorer (Ctrl+R), right-click it and choose Remove. Excel offers to export the module first. The Macros dialog (Alt+F8) can delete macros too, but it never lists event code such as Workbook_Open, or VBA functions, so it can't empty a project. Either way, the file is still an .xlsm until you save it as .xlsx.
This page is the better route when you don't have Excel on the machine, when you'd rather not open an unknown sender's .xlsm in Excel at all, or when you want to know what will break before you commit.
Limits
- Removal is permanent in the download. The macros can't be put back from the .xlsx. Keep the original .xlsm if you might need them.
- No copy of the code. The tool shows module names and line counts, but it doesn't show the code or export it. Export modules from the Visual Basic Editor first (File > Export File) if you want to keep them.
- Buttons stay. Shapes and form controls assigned to macros remain in the file and do nothing. Delete them in Excel if they'd confuse the recipient.
- No .xls or .xlsb. Open those in Excel and save as .xlsx, which removes the macros on its own.
- 50MB per file, and no password-to-open files. The page recognises an encrypted file and explains it. Open it in Excel, save a copy without the password, and convert that.
- VBA functions are counted by name. A cell counts when the function's name in its formula matches one in the workbook's own code. A formula calling a function from another workbook or an add-in isn't counted.
A workbook heading to a client also carries the author, the last person to save it and often the folder it was saved in. Remove Excel Metadata clears those. To see every sheet in the converted file, hidden and very hidden ones included, open it in the Excel Viewer.
Questions
Does saving as xlsx remove macros?
Yes. When you save a macro-enabled workbook as Excel Workbook (.xlsx), Excel warns that the VB project can't be saved in a macro-free workbook and deletes it if you click Yes. This tool makes the same removal without Excel, including Excel 4.0 macro sheets and names. Keep the original .xlsm either way, because the code can't be brought back from the .xlsx.
How do I convert xlsm to xlsx without losing data?
Save it as .xlsx in Excel, or drop it on this page and download the result: cell values, formulas, formatting, charts, pictures, notes and pivot tables stay as they were. The exception is an Excel 4.0 macro sheet: its formula cells are emptied, and its typed values stay. What goes is the code and whatever depended on it. A cell that calls a VBA function shows #NAME? once Excel recalculates, so paste those cells as values in the original first if the numbers matter.
Can I recover macros after saving as xlsx?
No, not from the .xlsx itself, because the VBA project is deleted from it. The code is still in the original .xlsm if you kept it. To keep the code separately, open the original in the Visual Basic Editor and use File > Export File on each module.
Why does Excel say my workbook contains macros when there are none?
Often because a VBA module is still there after its code was deleted, like the Module1 a recorded macro leaves behind: Excel still counts that project as macros. The other cause is Excel 4.0 macros, which don't show in the Visual Basic Editor. They sit on a macro sheet or in a defined name that calls a function such as GET.CELL or EVALUATE, and those names are visible in Formulas > Name Manager. This tool lists both kinds and removes them the way Excel's Save As .xlsx does.
Can I rename a .xlsm file to .xlsx?
No. Renaming changes the extension but not the file, which still declares itself macro-enabled inside, and Excel refuses to open it with an error saying the file format or file extension is not valid. Save it as .xlsx in Excel or convert it here instead. This tool checks .xlsx files too, so a file that was renamed gets converted properly.
How do I delete a macro button in Excel?
Select the button without running it, then press Delete. For a Form Controls button, Ctrl+click it to select it; for an ActiveX button, turn on Developer > Design Mode first. Removing the macros doesn't remove the button. A Form Controls button or shape assigned to a macro stays, and clicking it afterwards shows Excel's Cannot run the macro message.