7 Ways to Disable Macros in Microsoft Excel

Excel VBA macros undoubtedly automate repetitive tasks, ensuring swift execution with unparalleled precision. Nevertheless, the convenience they offer comes with inherent security risks, potentially exposing you to phishing, spyware, and ransomware threats. Thus, it becomes imperative to learn how to disable macros in Excel to shield your personal and business data from hacking attempts.

By ensuring that Excel macros are disabled, you can thwart the execution of “auto-executable” or “auto-run” macros your friends, mentors, colleagues, clients, or strangers email you. Read on as I explain the most efficient and proven methods to stop macros.

By the end of this article, you’ll possess the knowledge to fortify your Excel installation, striking a balance between the efficiency of macros and the paramount importance of cybersecurity in the digital landscape. Let’s get started!

Disable Macros in Excel Using Trust Center

The Trust Center is the most common tool to disable and enable macros in Excel.

Excel options dialog
Excel options dialog

Open Microsoft Excel and press Alt + F + T to open the Excel Options dialog.

Trust center settings
Trust center settings

In the Excel Options dialog box, choose Trust Center from the left-hand navigation panel. On the right side, click on the Trust Center Settings button in the Trust Center section.

Macro settings
Macro settings

In the Trust Center dialog box, choose the Macro Settings option from the left-side navigation pane.

Choose the option ‘Disable VBA macros with notification‘ to disable macros but receive a prompt when they are present.

To apply the changes and close out the Trust Center dialog, click OK.

Finally, click OK in the Excel Options window to save your changes.

📒 Read More: Quick Ways to Password Protect a Microsoft Excel File

Disable Macros in Excel Using Digital Signs

Suppose, you can’t afford to disable macros but are worried about the safety and security of your business data. In this situation, you can force Excel to only execute macros that have been previously signed with a digital signature for macro.

Also, the digital signature must be from a trusted source like your business organization so that smart hackers can’t get into your Excel desktop app faking digital signatures.

Excel VBA Editor tool
Excel VBA Editor tool

Open a trusted macro-enabled Excel workbook on your PC and press Alt + F11 to open the Excel VBA Editor tool.

Digital signature in Tools
Digital signature in Tools

Click on the Tools button and choose Digital Signature on the context menu that pops open. Excel will automatically select a default or last-used macro in the VBA Editor.

Choose button
Choose button

Hit the Choose button on the Digital Signature dialog box.

A dialog box will open from which you can choose trusted digital signatures available through your organization.

Digital signature library error
Digital signature library error

If there aren’t any digital signatures, you’ll get the above error message. So, insert your smart card provided by the business to create new digital signatures for your Excel VBA macros. Alternatively, you can contact the IT systems admin who manages your Windows PC and Microsoft 365 installation.

Repeat the same steps for all other macros in the workbook to digitally sign macros.

Changing macro trust settings
Changing macro trust settings

Now, go to Excel Options > Trust Center > Trust Center Settings > Macro Settings > and choose the ‘Disable VBA macros except digitally signed macros‘ option.

Click OK twice to apply and save the changes you’ve made.

Disable Macros in Excel By Removing Add-Ins

Most Excel add-ins are nothing but complex and expansive Excel VBA macros. An Excel add-in developer simply saves the XLSM or macro-enabled Excel workbook file in XLAM format to convert a VBA macro to an installable add-in.

So, to disable malicious macros from running the next time you restart Excel after installing innocent-looking add-ins, you must disable such unsolicited Excel add-ins.

The Developer tab
The Developer tab

Go to the Developer tab and click on the Excel Add-ins button.

Excel add-ins dialog
Excel add-ins dialog

On the Add-ins dialog, uncheck the add-ins you want to disable and click OK. In the above screenshot, the Test add-in is such a tool that contains multiple self-executing VBA macros. So, I disabled it for safety purposes.

Disable com add-ins
Disable com add-ins

You can also check out the COM Add-ins menu to find more add-ins. Disable the suspected add-ins by unchecking their checkboxes.

Removing an add-in
Removing an add-in

For the rest of the add-ins, click Add-ins on the Developer tab. Click on the ellipses or the horizontal three-dots icon and choose Remove against the suspected add-ins.

Disable Macros in Excel Using Protected View

Excel trust center
Excel trust center

Navigate to the Excel Options dialog. There, choose the Trust Center option from the left-hand menu.

Now, click on the Trust Center Settings button in the Trust Center section on the right.

Enable protected view
Enable protected view

Choose the Protected View option from the left-hand menu in the Trust Center dialog.

Checkmark the checkbox for the option ‘Enable Protected View for files originating from the Internet‘ option to disable macros in files downloaded via web browsers.

Optionally, checkmark other relevant options such as files opened from potentially unsafe locations or Outlook attachments, based on your preferences.

Click OK twice
Click OK twice

Hit the OK button to apply the changes you’ve just introduced and close the Trust Center window.

At the end, click OK in the Excel Options window to save your changes.

Disable Macros in Excel Using File Block Settings

This method is a passive way to prevent unwanted activation of VBA macros in Excel.

Follow the steps mentioned earlier to access the Trust Center on your Excel desktop app.

When the Trusted Center dialog pops up, click on the File Block Settings category on the left-side navigation panel.

On the right side, you should see an exhaustive list of file types supported by the Excel PC software.

Checkmark the checkboxes for Open and Save columns for the following file types:

  • Excel 2007 and later Macro-Enabled Workbooks and Templates
  • Excel 2007 and later Add-in Files
  • Excel Add-in Files

Now, choose the ‘Open selected file types in Protected View‘ mode.

Click OK to save the changes you’ve just made.

Disable Macros in Excel By Changing the File Extension

Rename XLSM file
Rename XLSM file

Locate the Excel workbook file containing macros. Right-click on the file and select Rename from the context menu.

Rename confirmation
Rename confirmation

Change the file extension from XLSM (for macro-enabled workbooks) to XLS (for regular Excel workbooks).

Confirm the file extension change when prompted.

Open the modified file in Excel.

Since the file now has a different extension, Excel will treat it as a non-macro-enabled workbook. Hence, it won’t let any auto-executing macro run on your Excel installation.

Disable Macros in Excel Using Registry Editor

You can also disable the execution of VBA macros for Microsoft 365 apps like Excel, Word, etc., locally on a Windows PC. This method involves tweaking the registry entries of the operating system.

Before you proceed with the steps mentioned below, take a backup of the existing Windows Registry library. Do follow the steps carefully so as not to disturb any other settings of the Registry Editor tool.

Run reg editor
Run reg editor

Click on the Start menu button and type ‘Registry‘. The Registry Editor app will pop up as a search result. Click on that to open the Windows Registry Editor tool.

Copy pasting registry address
Copy and paste the registry address

In the address bar, copy and paste the following registry entry address:

Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Office\16.0\Excel\Security
Entering a registry entry
Entering a registry entry

Hit Enter. You should now see the VBAWarnings file on the right-side panel.

Changing value data
Changing value data

Double-click on it and change the Value data entry to numeric 1. This value tells Excel to block all VBA macros with a notification.

Click OK to save the changes you’ve made.

Various Office editions
Various Office editions

Office 16.0 contains the registry entries for the latest Excel desktop app. If you’re using an earlier version, try other editions like 11.0, 12.0, 14.0, and 15.0 in the Registry Editor.

Conclusions

Safeguarding your spreadsheets by understanding how to disable macros in Excel is a crucial aspect of ensuring data security and integrity.

Whether you choose to leverage Trust Center settings, digital signatures, or other methods discussed in this article, it’s essential to weigh the balance between functionality and security.

By following the outlined steps and employing best practices, you can fortify your documents against potential VBA macro-related security breaches.

If the article helped or you want to share feedback, don’t hesitate to comment in the box below!

About the Author

Bipasha Nath

Bipasha Nath

Bipasha is a technical content writer with 10+ years of experience in the technology industry. She previously worked in a SaaS software development company focused on SharePoint, OneDrive, Word, Excel, Word solutions.

Related Posts

Comments

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Get the Latest Microsoft Excel Tips

Follow Us

Follow us to stay up to date with the latest in Microsoft Excel!

Subscribe for awesome Microsoft Excel videos 😃