The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
The safest method is to keep an untouched original, open a duplicate with macros and other content disabled, inspect its VBA in Excel’s built-in Visual Basic Editor, and save a separate copy as .xlsx if you want the VBA removed. A standard Excel Workbook (.xlsx) does not save VBA; macro-enabled .xlsm and .xlsb files do.
Do not enable macros merely to read the code. Microsoft’s guidance is explicit: “You don’t need to enable macros to view or edit the file.” Saving as .xlsx removes VBA from that copy, but it does not prove that the workbook contains no other active content, external connections, Excel 4.0 macros, ActiveX controls, or add-ins.
Choose the operation that matches your goal
“Remove macros” and “inspect the workbook for hidden or active content” are separate jobs. Use the least destructive operation that answers your question, and do it on a duplicate whenever the workbook matters.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →| Goal | Operation | Effect on the working copy |
|---|---|---|
| Read or edit VBA code | Open the duplicate in desktop Excel and use Developer > Visual Basic while macros remain disabled. | The VBA project remains in the file, but you can inspect its text without running it. |
| Remove VBA from a copy | Use File > Save As and choose Excel Workbook (*.xlsx). | The saved copy does not retain VBA macros. The original .xlsm or .xlsb remains available. |
| Find document metadata or hidden workbook content | On a copy, use File > Info > Check for Issues > Inspect Document. | You can selectively remove findings. Some removals cannot be restored with Undo, and some VBA-related content cannot be removed automatically. |
Excel’s ribbon labels vary by version and platform, and an employer or school can enforce macro settings. The steps below describe the desktop Excel workflow covered by Microsoft’s current support documentation.
#1 Best Overall
Prepare a safe inspection copy
1. Preserve the original
Make an untouched copy before opening the workbook for cleanup. Store the original in a location where you will not accidentally overwrite it, then give the working copy a clearly different name. If the workbook is important, keep both the original macro-enabled file and the eventual macro-free copy until you have tested the result.
This matters because conversion and inspection tools can change a file in ways that are not fully reversible. Microsoft specifically recommends using Document Inspector on a copy because some removals cannot be restored with Undo. A duplicate also gives you a recovery path if formulas, buttons, reports, or other workbook features depend on the VBA.
2. Keep content disabled
When Excel displays a security warning, do not select an option that enables macros or other active content just to inspect the file. Do not add the file to a trusted location and do not lower global macro-security settings as a shortcut. Those changes affect how Excel treats future files, while they are unnecessary for reading VBA code.
If the file came from email, a download, or another unverified source, treat the warning as a reason to confirm who supplied it and why. It is not a reason to unblock the file so that its code can run. You can inspect the project with macros disabled.
3. Confirm that you are using a suitable Excel edition
The Visual Basic Editor route applies to desktop Excel. The exact ribbon and dialog wording can differ between Microsoft 365 editions and other supported desktop versions. Administrative policy can also prevent you from changing macro options or opening particular project features. If your organization controls these settings, ask the administrator for an approved inspection process instead of bypassing the policy.
Rank #2
Open the VBA project without running it
Show the Developer tab
If Developer is not visible in the ribbon, open Excel’s ribbon customization settings and enable it. In desktop Excel for Windows, the usual path is File > Options > Customize Ribbon, select Developer, and apply the change. The wording can differ in other desktop versions.
Launch the Visual Basic Editor
- Open the duplicate workbook in desktop Excel and leave macros disabled.
- Select Developer > Visual Basic. This opens the built-in Visual Basic Editor (VBE).
- If the project list is not visible, select View > Project Explorer. In Windows, Microsoft also documents Ctrl+R for showing Project Explorer.
- In Project Explorer, select the workbook’s VBA project and expand its folders and modules.
Opening the editor is not the same as executing a procedure. Do not use Run, press F5, choose a step-through command, or enable content while you are performing a basic inspection. Read the code as text and record what you find before deciding whether the workbook should retain any automation.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
What to inspect in the Visual Basic Editor
Standard modules
Expand the project and open each standard module. Read the procedures from top to bottom, noting what each one appears to do and which worksheets, ranges, files, or settings it touches. A procedure may be harmless, essential to a report, or dependent on resources that are not present on your computer. The fact that code is visible does not certify that it is safe.
Workbook and worksheet event code
Inspect the ThisWorkbook object and each worksheet object, not just the standard modules. Event procedures can run when a workbook opens, a sheet is activated, a cell changes, or another workbook event occurs. Record any event code and the conditions under which it is intended to run. Do not trigger those events deliberately during an initial review.
Class modules and references
Review class modules if they are present, then examine the project’s references as available in the editor. A missing or unusual reference can explain why a workbook behaves differently on another computer. It can also mean that a procedure depends on an installed component or setting that you have not evaluated.
Calls outside the workbook
Pay particular attention to procedures that appear to access external files, launch another application, connect to a network resource, change system or Excel settings, or write data outside the workbook. These are reasons to stop and verify the workbook’s provenance and intended use, not reasons to test the procedure by running it. Code review can identify what a procedure requests; it cannot by itself guarantee that a dependency or external destination is trustworthy.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesKeep an inspection record
- Write down the names of modules and event procedures you reviewed.
- Note references, external resources, and any procedure whose purpose is unclear.
- Record whether the workbook depends on buttons, forms, scheduled actions, or other controls that may call VBA.
- Do not edit the original project while you are still deciding whether its automation is needed.
Remove VBA by saving a duplicate as .xlsx
Use this method when your goal is a working copy without VBA, not merely a report about what the code does.
- Close the Visual Basic Editor and return to the duplicate workbook.
- Select File > Save As.
- Choose a new filename and select Excel Workbook (*.xlsx) as the file type. Do not overwrite the original macro-enabled file.
- When Excel warns that the selected format cannot preserve VBA, confirm that you want to use the Excel Workbook format or discard the macros.
- Close the newly saved
.xlsxfile and reopen it. - Check the workbook’s important sheets, formulas, named items, reports, controls, and calculations. Confirm that the result meets your needs before deleting or archiving the original.
The format distinction is important: .xlsx is the standard Excel Workbook format and does not save VBA macros, while .xlsm and .xlsb are macro-enabled formats. Converting to .xlsx therefore removes the VBA project from that saved copy, but it may also remove buttons or workflows whose function depended on the code.
What to test after conversion
- Open every worksheet that people use and verify that formulas calculate as expected.
- Check reports, pivots, filters, named ranges, and links that the workbook relies on.
- Look for buttons or controls that no longer perform an action; a macro-free workbook cannot execute their VBA procedures.
- Compare important totals with the original while the original remains preserved.
- Give the macro-free file a name that makes its status obvious, such as a version or date, so it is not confused with the source.
If the workbook stops working after conversion, return to the untouched original rather than trying to reconstruct the discarded project from the converted file. Decide whether the automation is required, and if it is, retain the macro-enabled format and have the code reviewed under an approved process.
Use Document Inspector for hidden data, not as a VBA malware scanner
Document Inspector addresses a different question: what document properties, hidden information, or other categories of content are present? On a duplicate workbook, open File > Info > Check for Issues > Inspect Document. Select the categories you want to examine, run the inspection, review each finding, and choose Remove All only for categories you deliberately want to clean.
Rank #4
Do not treat the tool as proof that a workbook is harmless or as a complete scanner for every active component. Microsoft notes that some VBA-related content may be detected but cannot be removed automatically because doing so could stop the workbook from working properly. Hidden rows or sheets can also affect calculations, so removing or exposing content without understanding its role can change results.
Document Inspector is therefore complementary to saving as .xlsx:
- Saving as
.xlsxis the direct way to produce a copy that does not save VBA. - Document Inspector lets you review selected categories and remove particular findings.
- Neither operation should be described as evidence that all external content or every active feature is absent.
VBA is only one kind of active content
Excel distinguishes VBA from Excel 4.0 (XLM) macros. A workbook can also contain ActiveX controls, add-ins, and external content or connections. Removing VBA from a copy does not establish that those other categories are absent, trusted, or harmless.
When the workbook’s origin is uncertain, include those categories in your review. Determine which controls and external connections the workbook is supposed to use, and do not enable them merely to see what they do. If the file is business-critical or its provenance cannot be established, involve your organization’s security or Excel administrator before allowing any active content to run.
Recommended Free Tools
Internet-origin files and platform differences
On specified Office versions running Windows, Microsoft documents that macros from internet-origin files are blocked by default under conditions tied to the file’s origin and other security signals. The behavior depends on factors such as Mark of the Web, trusted locations, signatures, and organizational policy. Microsoft says this change does not apply in the same way to Office for Mac, Android, iOS, or the web.
That variation is why a warning should be interpreted in context. Verify who supplied the file, why it contains macros, and whether your organization expects it. Do not use an unblock action or a trusted-location change as an inspection technique. Keep the file’s content disabled while you read the project.
Troubleshoot common problems without weakening security
The Developer tab or Visual Basic command is missing
Enable the Developer tab through ribbon customization, then try Developer > Visual Basic again. If the command is unavailable or settings are locked, an administrative policy may be responsible. Use an approved workstation or ask the administrator rather than changing global security controls.
Excel asks whether to enable content
Decline the request for a basic inspection. You can view and edit the file’s VBA without enabling macros. If you cannot access the project while content is disabled, record the limitation and seek an approved review process; do not assume that running the code is the only way to understand it.
Free tools Windows power users keep installed
One-click scans. No signup required.
Save As warns that macros cannot be saved
That warning is expected when converting to .xlsx. Confirm the Excel Workbook format only after verifying that you are saving a duplicate and that you no longer need the VBA in that copy. Keep the original .xlsm or .xlsb unchanged.
The converted workbook no longer works
Restore the untouched original and identify which feature depended on VBA. Buttons, event-driven actions, and automated reports may stop functioning when their code is removed. Do not overwrite the original with the failed conversion; create another copy for any further testing.
Document Inspector reports content it cannot remove
Read the finding and leave it in place if automatic removal could break the workbook. Document Inspector is selective cleanup, not a command to erase every detected item. Use the separate .xlsx conversion only when removing VBA is specifically your goal, and remember that other active-content categories still require their own review.
You opened the wrong file
Close it without saving, locate the preserved original and the clearly named working copy, and restart from the duplicate. File naming and separate storage are simple safeguards against inspecting or converting the only copy.
Quick Recap
A practical safe-inspection checklist
- Keep an untouched original and work on a duplicate.
- Leave macros and other active content disabled.
- Do not add the file to a trusted location or change global macro settings just to inspect it.
- Use Developer > Visual Basic and show Project Explorer with View > Project Explorer or Ctrl+R on Windows.
- Read standard modules,
ThisWorkbook, worksheet event code, class modules, and references as available. - Do not run, step through, or otherwise execute procedures during the initial review.
- For a macro-free copy, use Save As > Excel Workbook (*.xlsx).
- Reopen and test the converted copy while retaining the original.
- Use Document Inspector on a copy for its own findings, remembering that some removals are not undoable.
- Consider XLM macros, ActiveX, add-ins, and external content separately; removing VBA is not proof that the workbook has no other active features.
- For files from the internet or an unknown sender, verify provenance instead of unblocking them.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

