Updated August 11, 2023
Enable Macros in Excel
Macros in Excel are a series of commands that can use to record, automate and perform repetitive tasks as often as you want. Enable Macros in Excel; we often do the same tasks several times. We use the Excel macros function to simplify our tasks and save time. After creating Macros in Excel, we can edit and make minor changes to how it works.
What is Enabling of Macros in Excel? Excel
Enabling macros means any file can run macros codes on your computer, which is potentially dangerous from the security point of view, depending on the security levels set in your program and computers.
How to open and run the Macros setting dialog box in Excel?
- Enable macros in the Message Bar.
- Enable macros in Excel through the Macros setting under the Trust center.
- Even if all macros are disabled.
Let us elaborate and understand the above points.
1. Enable Macros in the Message Bar
- First, we need to see whether the developer tab is added to use this particular method. If it is added, we can start directly from the developer tab.
- If not, add the Developer tab in the ribbon and start.
- Go to the File tab-> Click on Options.
Or
- Right-click, the mouse anywhere in the ribbon.
- A pop-up list will appear. From the pop-up list, choose Customize Ribbon.
- Excel Options dialog box will appear. Click on the Customize Ribbon in the left panel menu of the Excel Options dialog box.
- On the right-hand side of the panel, Customize ribbon screen Click on Developer under Main tabs, Click OK button. This will add the Developer Tab to the Excel ribbon.
- Click on Developer Tab-> Go to the Macro Security option under the code group.
- Trust center screen will appear. Click on the Macro Settings in the left panel. To enable macros, select the radio button corresponding to Enable all macros (not recommended; potentially dangerous code can run) option under the Macro Settings section.
- When an excel document is re-opened, which contains macros and Disabled all macros with the notification is selected, a yellow Message Bar with a shield icon and Enable content button appears on top of the excel sheet.
- Press Enable content button where the macros are from trustworthy sources.
- Thus the file becomes a trusted document, and the security warning message will disappear.
- A security warning message will be displayed in case of Disabled macros.
- Go to the File tab -> Click on Info to check the same. You will find Security Warning under Information about enabling macros in Excel on the right-hand side.
- But if the file is enabled, no such option will appear under the Info option.
Disabled macros in Excel:
Enabled macros in Excel:
2. Enable Macros in Excel through Macros Settings under the Trust Center
Steps to follow if Macros Settings are not working:
By default, macros remain disabled in MS Excel. To enable macros in Excel, please refer to the following steps:
- Go to the File menu in the Excel ribbon. In the backstage view under Help, click on Options -> the Excel Options dialog box will appear.
- Click on the Trust Center in the left panel menu of the Excel Options dialog box.
- The Trust Center screen appears in the right panel of the Excel Options dialog box.
- Click on Trust Centre Settings…
- The Trust Center dialog box will appear.
- Click on the Macro Settings in the left panel of the Trust Center dialog box.
- The Macro Settings options are presented in the right panel with 2 sections: Macro Settings and Developer Macros Settings.
- Under the Macro Settings section, Disable all macros with notification radio button remains selected by default.
- The checkbox corresponding to Trust access to the VBA object model under the Developer Macros Settings section remains deselected by default.
- To Enable macros, select the radio button corresponding to Enable all macros (not recommended; potentially dangerous code can run) option under the Macros Settings section. Also, select the checkbox corresponding to Trust access to the VBA object model under Developer Macros Settings.
The above settings will enable macros by default in Excel, exposing the computer to vulnerabilities.
3. How to run Macros when all macros settings are disabled?
It is possible to run macros even when Disable all macros without notification are turned on. In this case, we can run macros-enabled files from locations trusted by Excel. This is possible as part of Excel 2007-2013.
Following are the steps to be followed for adding locations to the trusted zone.
In Excel, click go to File. Click on Options.
- Excel Options dialog box appears. Click on the Trust Center option in the left panel of the Excel Options dialog box.
- The screen on the right panel of the Excel Options dialog box shows the Trust Center screen. Click on Trust Center Settings… button under the Microsoft Excel Trust Center section.
- Trust Center dialog box appears. Click on the Trust Locations option in the left panel of the Trust Center dialog box. The screen on the right panel of the Trust Center dialog box shows the Trust Locations screen. In Trust Locations, the list of trusted locations is seen. You may add new locations or folders.
Following are trusted locations, by default, for macros to run from.
- Program Files (x86)\Microsoft Office\Templates\
- AppData\Roaming\Microsoft\Excel\XLSTART\
- Program Files (x86)\Microsoft Office\Office14\XLSTART\
- AppData\Roaming\Microsoft\Templates\
- Program Files (x86)\Microsoft Office\Office14\STARTUP\
- C:\Program Files (x86)\Microsoft Office\Office14\Library\
One can Add, Remove or Modify trusted locations from the Trusted Locations screen.
Conclusion
- Macros function to automate and repeat complex activities as many times as require.
- Enabling Macros in Excel can be done through a number of methods. Choose the one at your convenience.
- The benefit of enabling Macros is that it exposes the computer to the possibility of running potentially malicious code that may reside inside the macros.
Recommended Articles
This has been a guide to Enable Macros in Excel. Here we discussed how to Enable and Disable Macros in Excel through different methods along with practical examples and downloadable excel template. You can also go through our other suggested articles –