Always enable macros in a workbook

Macros are used to automate a repeated task in a workbook. When you open a workbook that has macros, a yellow message bar appears with a shield icon and the Enable Content button.

Security Warning Message Bar for macros

If you know the macro is from someone you trust, click Enable Content. The next time you open the file, you won’t see the message bar and the macros will be enabled.

Warning:  If you don’t know who created the macro, consider leaving the macros disabled. Macros can be used to run viruses and programs that can damage your computer or network.

Allow macros to run whenever I open any workbook

You can decide to change the settings in Excel to allow all macros to run in any workbook you open. However, this makes your computer vulnerable to viruses and programs that can damage your computer or network. By changing these settings, you are letting all macros run, without first deciding if you trust their source. If you are comfortable with this risk, do the following:

  1. Click File > Options.

  2. Click Trust Center, and then click Trust Center Settings.

  3. In the Trust Center, click Macro Settings, and then click Enable all macros (not recommended, potentially dangerous code can run).

Note:  If you’re trying to change these settings on a computer at work, and they aren’t available, it may be because your system administrator set an option that stops people from changing these settings.

To learn more about macros, see Enable or disable macros in Office files.

Share Facebook Facebook Twitter Twitter Email Email

Was this information helpful?

Great! Any other feedback?

How can we improve it?

Thank you for your feedback!