Javatpoint Logo
Javatpoint Logo

How to easily enable macros in Microsoft Excel?

It is well known that the respective MS Excel is also termed as the "Microsoft Excel" or "Excel" and it is considered to be the essential spreadsheet software which are widely used and the respective "spreadsheet software" type is so much powerful in nature, using which we can easily record many set of the data across multiple desired worksheets in different cells.

And besides all this, we can also perform various mathematical calculations as well as the analytical operations by making use of the the existing functions and formulas. We may need to perform the same operation in Microsoft Excel for the multiple times.

Microsoft Excel enables the various users to perform repetitive tasks by just "automating" them to save significant time. This is where an existing feature called "Macros" comes into play effectively.

In the earlier days, the Microsoft Excel Macros were very common and could run automatically in Excel respectively. However, this raises the possibility of running into errors in terms of security concerns. This forced Microsoft to implement safety and security precautions by disabling the execution of Macros by default. Although we can still make use of the "Macros" in Microsoft Excel by first allowing or enabling the Macros feature.

How to easily enable macros in Microsoft Excel

And in this respective tutorial we will be further discussing out the various step-by-step methods or solutions on "how to enable Macros in Microsoft Excel." But before discussing the methods, let us now first take a brief introduction to "Excel Macros" in Excel.

What do we mean by the term "Macros" in Microsoft Excel?

We all know that the respective Microsoft Excel offers various features, and one of its essential features of it is none other than "Macros." Besides all this, the particular "Macros" are mainly small programs that are effectively stored within Excel documents, which help us easily automate specific operations by executing them in Microsoft Excel.

Microsoft Excel basically allows us to record a Macro and save a set of actions accordingly. Whenever we are required to perform the same actions again and again, so in that case we can easily execute the "recorded Macro and the associated operation are performed automatically, and in this, we can quickly perform repetitive activities while minimizing out the time that are spent upon the core operation or on other task as well.

Although we usually record a Macro using mouse clicks and GUI, and the Microsoft Excel converts the actions into VBA codes behind the scenes.

How to enable macros in Microsoft Excel?

An essential advantage of the Microsoft Excel program is that it primarily provides many different ways to perform any specific task, whether it could be a simple task or a complex operation.

In the same way, we get different ways to enable macros in Microsoft Excel. However, each specific method has its benefits, and it helps to enable macros for specific use cases. The following are some common ways to enable macros in Microsoft Excel:

Enabling Macros using Security Notice

And the fastest way which can be used to enable any macros for the specific workbook is to just make use of the "Security Warning" in that particular workbook's window. If our Microsoft Excel program has the default configuration for the macros, we usually see a warning message at the top of the worksheet under the ribbon. This yellow security warning box displays, "Macros have been disabled." It means that Excel has blocked any macros from executing in that workbook.

Moreover, Microsoft Excel also shows us the 'Enable Content' button apart from the warning message, which can allow macros for that individual file or workbook. However, it is recommended to use this button only if we trust the source of the corresponding Excel file.

How to enable macros in excel

Now let us assume that there is an Excel window with a VBA editor running on it. In that case, we will see the Microsoft Excel Security Notice window after we open any Excel file with macros. In that case, we usually do not see the above yellow warning bar. If we trust the file or the source it came from, we can enable macros of that particular file by clicking on the 'Enable Macros' button in the Microsoft Excel Security Notice window.

And the respective Microsoft Excel Security Notice window will look like this:

How to enable macros in excel

Enabling Macros by just making use of the backstage view

It is termed the other important as well as the easiest method that can be effectively used to enable the "macros" in Microsoft Excel is to use the "Office Backstage view."

And if we want to access the options efficiently in the "backstage view," we must go to the File tab and select the Info from the given list. After that, we need to click on the drop-down arrow associated with the 'Enable Content' button; by doing this, it will be displaying out the two additional options:

How to enable macros in excel

Option 1: Enable All Content

The first option, Enable All Content, is primarily used when we want to trust any specific Excel file, allowing its active contents like macros. This method works only for that particular Excel file. However, all other Excel files with macros will not be allowed. We will get the Warning message on other similar files.

How to enable macros in excel

And when we click on the 'Enable All Content' option, it will work similarly to the previous method where we had to click on the 'Enable Content' button via the Security Notice.' Once we enable the file's contents, it is treated as a trusted document. Therefore, if we open the same file again, we will not get any warning again for that particular file with macros.

Option 2: Advanced Options

The second option is the "Advanced Options," mainly used for "enabling the macros of the particular file" only for the session.

Moreover, this option does not make the associated file a trusted document. In some cases, enabling the macros for only a single session makes sense.

For instance, let us assume we have an Excel file with macros (or VBA) and only wish to investigate it without making it a trusted document. In that scenario, we can effectively use option 2 (Advanced Options) and enable the file's content until the respective file is kept open in Microsoft Excel.

How to enable macros in excel

After that, when we click the 'Advanced Options' button, we will encounter the other window named "Microsoft Office Security Options."

Here in this, we are required to select the "circle radio button," which is efficiently associated with the 'Enable content for this session' option to enable macros for single-use, and just after that, we need to click on the OK button. If we close the file and reopen it, the warning will reappear, and macros will get disabled effectively.

How to enable macros in excel

How can one easily open and run the Macros setting dialog box in Microsoft Excel?

  1. By just enabling the macros in the Message Bar.
  2. By enabling the macros in Microsoft Excel through the Macros setting, just under the Trust center.
  3. Even if all macros are disabled.

Let us now elaborate and understand the above points in detail.

1. Enable macros in the Message bar.

Now to enable the macros in the Message Bar, we are required to follow the below-mentioned steps carefully:

Step 1: First of all, we are required to see whether the "developer tab" is added to use this particular method or not, and if in case it is added, then we can quickly start directly from the developer tab respectively.

Step 2: If not, we must add the Developer tab in the ribbon and start.

Step 3: Now, in this step, we must go to the File tab-> and click on the Options respectively.

How to enable macros in excel

Or

Instead, we can also right-click the mouse anywhere in the ribbon.

How to enable macros in excel

Step 4: A pop-up list will appear on the screen, and from the respective pop-up list, we must choose Customize Ribbon respectively.

Step 5: After performing the above steps, an Excel Options dialog box will appear on the screen. And then, we need to right-click on the Customize Ribbon, which is present in the left panel menu of the Excel Options dialog box respectively.

Step 6: And now, on the right-hand side of the panel, Customize ribbon screen, we are required to click on the Developer option, which is present under the Main tabs; after that, we need to click on the OK button; doing this will be adding the Developer Tab to the Excel ribbon as well.

How to enable macros in excel

Step 7: In this step, we will click on Developer Tab->, and then we need to go to the Macro Security option, which is effectively present just under the code group.

How to enable macros in excel

Step 8: After performing the above steps, a "Trust Center" screen will also appear on the screen. Now we will be clicking on the Macro Settings, which are present in the left panel. To enable macros, we must select the radio buttons corresponding to enable all macros (not recommended; potentially dangerous code can run) option under the Macro Settings section.

How to enable macros in excel

Step 9: When an Excel document is reopened, 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.

Step 10: In this step, we are required to press Enable Content button where the macros are also from trustworthy sources.

And thus, the respective file becomes a trusted document, and the security warning message will disappear from our screen.

How to enable macros in excel

And the security warning message will be displayed in case of the Disabled macros.

Go to the File tab -> Click on Info to check the same; we 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 Microsoft Excel:

How to enable macros in excel

Enabled macros in Microsoft Excel:

How to enable macros in excel

2. Just enable the Macros in Microsoft Excel through Macros Settings, just under the Trust center.

We are required to follow the below-mentioned steps if in case the Macros Settings are not working:

And by default, the macros remain disabled in Microsoft Excel, and if in case we want to enable the macros in Microsoft Excel, please refer to the following steps carefully:

Step 1: First of all, we are required to go to the File menus which are present under the Excel ribbon. And in the backstage view, it was present under the Help option, we will click on Options -> the Excel Options dialog box will get appear on the screen.

How to enable macros in excel

Step 2: In this step, we must need to click on the Trust Center that are available in the left panel menu of the Excel Options dialog box.

Step 3: After performing the above step, the Trust Center screen will get appear in the right panel of the Excel Options dialog box.

Step 4: We must click on the "Trust Centre Settings" to proceed further.

How to enable macros in excel

Step 5: After performing the above steps, the Trust Center dialog box will get appear on the screen.

Step 6: Now in this step we must click on the "Macro Settings," which primarily available in the left panel of the "Trust Center dialog box".

How to enable macros in excel

Step 7: The "Macro Settings options" are available in the right panel with 2 sections: Macro Settings and Developer Macros Settings.

Step 8: Now, under the "Macro Settings section," we must turn off all macros with the notification radio button remaining selected by default respectively.

Step 9: Moreover, the respective checkbox corresponding to "Trust access" to the VBA object model under the "Developer Macros Settings" section remains deselected by default effectively.

Step 10: If we want to "Enable macros" in our Excel sheet, then we need to select the radio button corresponding to Enable all macros (not recommended; potentially dangerous code can run) option under the "Macros Settings section." Also, we must select the checkbox corresponding to Trust access to the VBA object model, which is present just under the "Developer Macros Settings," respectively.

How to enable macros in excel

Now the above settings will enable macros by default in Microsoft Excel, exposing the computer to vulnerabilities.

3. How can one easily run macros when all macros settings are disabled in Microsoft Excel?

We all know that, it is possible to run "macros" even when Disable all macros without notification turned. In this case, we can easily run macros-enabled files from the respective locations, which Microsoft Excel also trusts. Moreover, this is possible as part of Microsoft Excel 2007-2013.

Following are the steps which need to be followed by us to add locations to the trusted zone respectively.

Step 1: Firstly, in Microsoft Excel click Go to File, and then we must need to click on Options.

How to enable macros in excel

Step 2: After performing the above step, we will be encountered with the Microsoft Excel Options dialog box that will get appears on our screen effectively, and then we are required to click on the Trust Center option, available in the left panel of the Excel Options dialog box as well.

Step 3: And now, the screen on the right panel of the Excel Options dialog box shows the Trust Center screen, where we click on Trust Center Setting button, which are available just under the Microsoft Excel Trust Center section respectively.

How to enable macros in excel

Step 4: After performing the above steps, a Trust Center dialog box appears on our screen, and then we must 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. And in Trust Locations, the list of trusted locations is seen. We may add new locations or folders, respectively.

How to enable macros in excel

Following are the various 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\.

We can efficiently Add, Remove or Modify trusted locations from the Trusted Locations screen.

What are the various important points that need to be remembered by an individual while working with the enabling of the macros in Microsoft Excel?

The various essential points that need to be remembered by an individual while working with the enabling of the macros in Microsoft Excel are as follows:

  • Individuals are highly recommended to "enable macros" permanently, as they can be harmful if not from trusted and authentic sources.
  • Users can quickly identify Microsoft Excel documents with macros by checking their extensions. And in general, the files containing macros (or VBA codes) are saved as a 'macro-enabled workbook' or in the XLSM extension, respectively.
  • And it is very much essential to note that there is no option to programmatically turn macros in Excel on or off by just making use of the VBA (Visual Basic for Applications).
  • Moreover, the respective Microsoft Excel turns off all the macros by default but notifies users regarding it every time an individual can open any file with the macros. However, he can silently turn off all macros by using the first option, 'Disable all macros without notification,' from the Macro Settings under Trust Center, as this will automatically block macros in Excel files without notifying us.

Conclusion

  • It was well known that the respective "Macros function" is purposely used to automate and repeat complex activities as often as required.
  • And Enabling Macros in Excel can be easily achieved through several methods. And from that, we are required to choose the one at our convenience.
  • The benefit of enabling Macros is to just expose the computer to the possibility of running potentially malicious code that may reside inside the macros.






Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA