Home » Blog » How to enable and disable macros in Excel

How to enable and disable macros in Excel

The scripts known as macros may be included in Microsoft Excel spreadsheets. Macros are simple, small programs that can automate common tasks in Excel (or other Office programs).

There were times when Excel macro viruses, but Microsoft had to apply security precautions, and disable macros by default, — malicious macros that could cause serious harm.
Macros can be used for good and evil, just like almost every technology. All macros are thus disabled by default in Microsoft Excel. This tutorial deals with various methods of enabling Excel macros and explains potential risks.

Macro security in Excel:

It is important to understand how dangerous macros can be before you activate macros in your Excel worksheets.

Although VBA codes are highly efficient in the automation of complex, repeat tasks, they are a major safety risk source. A malicious macro you are running unwittingly may damage, delete or mix up your Microsoft Office installation files on your hard drive. That’s why all macros with notifications should be deactivated by Excel default.

How can these dangers be avoided? Follow only one simple rule: Enable only safe macro, macros from trusted sources, and VBA codes, that you wrote or registered for yourself.

You can still use macros in Excel these days, but you need the macro function to do so. This is how macros can be enabled and disabled.

How to enable macros in Excel:

You can permanently enable all macros with the Trust Center if you are willing to accept the risk of enables them in Excel.

  1. Click on File and click on Options.
  2. Click on the “Trust Center” window on the left side of the Excel Options window.
  3. Click on “Settings for Trust Center…”
  4. Click on “Macro Settings” in the navigation pane on the left.
  5. Click the “Enable all macros (not recommended: potentially harmful code could run)” button in the Macro Settings section and then click “OK.” As warned by the option, this is a dangerous and not recommended option.

How to permanently enable a single macro in Excel:

You can easily activate an Excel file with a macro when you open the table.

  1. Open your Excel macro file.
  2. A yellow Message Warning Bar should show you that macros were disabled. You should see this.
  3. Click “Enable Content.”

How to enable a macro in Excel for one time only:

You can configure Excel security settings for that if you want to run a particular macro just once.

  1. In Excel, open your macro file.
  2. A yellow Message Warning Bar should show you that macros were disabled. You should see this.
  3. Click File and click Info.
  4. Click on ‘Enable Content’ in the Security Warning section.
  5. Click on ‘Advanced Options’ in the dropdown menu.
  6. Click on ‘Enable session content’ and click on ‘OK.

The macro is enabled once and the next time you open the file, it will be disabled.

How to disable macros in Excel:

Excel’s default setting, as previously stated, is to disable notification macros and enable users to manually activate them if they want. If you want to silently disable all macros, then select the option for it (the first option) in the Trust Center, without any notification.

  1. Click the tab File > Options in your Excel.
  2. Select Trust Center in the left-hand pane, then click Settings for the Trust Center.
  3. From the left menu, choose Macro Settings, unnotifiedly select Disable all macros and click Ok.

Author: Olivia Smith is a Microsoft Office expert and a full-time blogger with 5 years of experience in the technology industry. She has written technical blogs, white papers, and reviews for a variety of websites, including office.com/setup.