Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Check Macros in Excel

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Checking macros in Excel lets you see what automated tasks are embedded in a workbook, helping you identify potential security risks or understand how data is being processed. Before you begin, ensure your Excel file is from a trusted source, as macros can contain malicious code. Excel’s macro security settings must be set to allow you to view or enable macros — this is controlled through the Trust Center.

What You'll Need

  • An Excel file (.xlsm, .xlsb, or .xlsx with embedded macros)
  • Microsoft Excel 2016 or later (Windows or macOS)
  • Administrative access if you need to change macro security settings

Step-by-Step

  1. Open the Excel file you want to check. If you see a yellow security warning bar at the top saying "Macros have been disabled," note that macros are currently blocked — you’ll still be able to view the macro list but not run them.
  2. Go to the Developer tab. If you don’t see this tab, enable it: click File > Options > Customize Ribbon, then check the box next to Developer under the Main Tabs list and click OK.
  3. In the Developer tab, click Macros. This opens the Macro dialog box.
  4. Review the list of macros shown. Each macro has a name and is associated with a module or sheet. If no macros appear, the workbook contains none.
  5. To examine a macro’s code, select it from the list and click Edit. This opens the Visual Basic for Applications (VBA) editor, where you can view the exact lines of code. Look for suspicious commands like Shell, DownloadFile, or Run that could indicate malicious intent.
  6. Close the VBA editor without making changes unless you’re certain the code is safe. To return to Excel, click the X in the top-right corner of the VBA window or press Alt + Q.
  7. For a quick overview without opening the editor, go to File > Info > Properties > Advanced Properties > Custom tab. Some workbooks list macro-related metadata here, though this is not always reliable.
  8. If you suspect the file is unsafe, do not enable macros. Save a copy as a .xlsx file (File > Save As > Excel Workbook) to permanently remove macros, preserving only the data and formatting.

Common Mistakes

  • Skipping the Developer tab setup: Many users assume the Developer tab is always visible. It’s hidden by default, so if you don’t see it, don’t assume macros don’t exist — check your ribbon settings.
  • Clicking "Enable Content" without reviewing: The security warning bar allows one-click enablement. Never click this unless you’ve checked the macro code or trust the source completely.
  • Confusing macros with formulas: Some users mistake complex formulas or pivot tables for macros. Macros are VBA scripts that automate actions; formulas are cell calculations. Use the Macro dialog to confirm.
  • Not saving a backup: Editing or removing macros can alter the file. Always save a copy before making changes.

Tips

  • Use the Macro Security Level setting (File > Options > Trust Center > Trust Center Settings > Macro Settings) to block all macros except those signed by trusted publishers — this is the safest option for most users.
  • Press Alt + F8 to open the Macro dialog quickly without navigating tabs.
  • To check for macros in a file before opening it, right-click the file in Windows Explorer, select Properties, and look under the General tab for a message like "This file came from another computer" — this can indicate embedded content.
  • Use Excel’s Inspect Document tool (Developer > Inspect Document) to detect hidden macros, comments, or personal data before sharing files.
  • If you’re auditing a shared workbook, ask the sender for a macro description or documentation. Legitimate business macros often come with a user guide.

Troubleshooting

  • No Developer tab appears: Go to File > Options > Customize Ribbon and ensure Developer is checked. If not listed, restart Excel or repair your Office installation.
  • Macros show as "Disabled" but I can’t see them: This means macros are blocked by policy. Check Trust Center settings: File > Options > Trust Center > Trust Center Settings > Macro Settings. Set it to "Disable all macros with notification" to see prompts.
  • Edit button is grayed out: The file is open in read-only mode, or macros are disabled. Close and reopen the file, then enable content from the security bar if trusted.
  • VBA editor won’t open: Your system may be missing VBA components. On Windows, reinstall Office and ensure "Visual Basic for Applications" is selected during installation. On macOS, ensure you have the latest Excel update.
  • Macro list is empty but I know there are macros: The macros may be stored in a personal macro workbook (PERSONAL.XLSB). Open a new workbook and check if the macros appear. If not, the file may be corrupted — try opening it in Excel’s Safe Mode (hold Ctrl while launching Excel).

Frequently Asked Questions

Can I check macros without opening the file?

Yes, but only partially. Right-click the file in Windows Explorer, choose Properties, and look for the "Unblock" checkbox or "This file came from another computer" message. This doesn’t show code, only indicates macros may exist.

Are all macros dangerous?

No. Many macros are harmless and automate routine tasks like formatting reports or generating charts. However, macros are a common vector for malware, so always verify the source and inspect the code before enabling.

How do I know if a macro is malicious?

Look for code that accesses external URLs, deletes files, sends emails, or runs system commands. Common red flags include Shell, DownloadFile, Execute, or obfuscated variable names. If unsure, don’t enable it.

Can I remove macros without losing data?

Yes. Save the file as a .xlsx format. This strips all macros while preserving cells, formulas, charts, and formatting. Use File > Save As > Excel Workbook (.xlsx).

Why can’t I see macros on my Mac?

Excel for Mac supports macros, but the Developer tab may be hidden. Enable it via Excel > Preferences > Ribbon & Toolbar, then check Developer. The Macro dialog and VBA editor work the same as on Windows.

Do macros work in Excel Online?

No. Excel Online does not support macros. If you upload a macro-enabled file to OneDrive or SharePoint, macros will be disabled and hidden. You can only view and edit data — not run or edit VBA code.