Enable or disable macros in Office files
※ Download: Enable macro in excel 2016
Get answers and train to solve all your tech problems - anytime, anywhere. Step 1: Access the Excel Options dialog. This way, when Excel displays a dialog saying that macros have been disabled and you need to enable macros, you'll know exactly what to do.
One example of something you don't want to do appears in Excel 2013 VBA and Macros. What Happens If You Ignore Or Dismiss The Security Warning Without Enabling Macros And, Later, Try To Run A Macro? Click this option if you want macros to be disabled, but you want to get security alerts if there are macros present.
Enable or disable macros in Office files - Once you're inside the Trust Center, make sure that you're on the Trusted Locations tab.
I've been there… I found a new macro that promised to automate a particularly annoying task, save me a ton of time and make me significantly more efficient in Excel. I tried to run the macro. Needless to say, I eventually learned how to enable macros in Excel. Otherwise, I wouldn't be writing this Excel tutorial now. However, since I know that I'm not the first or last one to raise those questions, I decided to write this post. My purpose with this tutorial is to answer the questions above and explain to you the most important things you need to know regarding how and when to enable macros in Excel. This way, when Excel displays a dialog saying that macros have been disabled and you need to enable macros, you'll know exactly what to do. Therefore, let's start by understanding… Excel's Default Macro Security Setting: Disable Macros With Notification Excel's default setting is to disable all macros with a notification. If this is the case, get in touch with this administrator. The first question you may have is… Why Are Excel Macros Not Enabled By Default? This may sound like ancient history to most of you, but: Once upon a time, Excel along with the other Microsoft Office applications enabled macros by default. But then: Kwyjibo came. In case you're a Simpsons fan and are wondering whether I'm referring to Homer Simpson… The answer is no. I'm also a little bit disappointed. I also like the Simpsons and would've enjoyed writing about them. I'm referring to , also known by other names such as Kwyjibo. This was a that propagated via a. The virus became famous back in 1999. Certain large corporations were affected. What do you think was the consequence of this? As explained in Excel 2013 VBA and Macros by Excel experts Bill Jelen and Tracy Syrstad, Microsoft changed the default security settings of the Microsoft Office applications. Under the current setting macros are, by default, not enabled. Nowadays, macro security is very important. The reason for this, as explained by Excel authority John Walkenbach in Excel VBA Programming for Dummies is that VBA is a very powerful language. Walkenbach goes on to explain that: A macro can delete files, send information to other computers, and even destroy Windows so that you can't even start your system. Therefore, you want to understand what you're doing when enabling macros. This way you'll be able to enjoy the benefits of macros while minimizing the risk of having your computer infected with dangerous. Let's assume, that you want to enable macros in Excel because you want to. The following sections explain the different ways in which you can enable macros in Excel and the most important aspects of macro security settings you'll need to understand in order to be reasonably protected from macro viruses. How To Change Your Global Macro Security Settings In Order To, Among Others, Enable Macros In Excel By Default Excel allows you to determine whether macros are enabled or disabled automatically. You determine these default settings through the , which is where you can see and set all the security and privacy settings for Excel. If you enable macros in Excel through the Trust Center, those settings become the new default and apply globally. If you want to enable macros for only certain Excel workbooks, you can do so by saving them in a trusted location, as I explain in the next section of this Excel tutorial. Let's see how to change your global macro security settings in 2 easy steps. This allows you to, for example, enable macros in Excel by default. Alternatively, you can get to the Trust Center through the Excel Options dialog. Do this in the following 4 simple steps. Step 1: Access the Excel Options dialog. Step 2: Go to the Trust Center tab. This takes you to the Trust Center. Step 4: Go to the Macro Settings tab. Once you're inside the Trust Center, make sure you're on the Macro Settings tab. This tab appears on the left side. Excel allows you to choose 1 out of 4 separate settings to set whether Excel enables or disables macros. To choose the macro setting you want to enable, simply click on the circle on the left side of it and, then, click on the OK button on the lower right corner of the Trust Center. Let's take a look at what each of these options means and does. Option 1: Disable All Macros Without Notification This option is self-explanatory. As you may've guessed, this is not the option you want to choose. As explained by Mr. Excel Bill Jelen and Tracy Syrstad in Excel 2013 VBA and Macros: This setting is for people who never intend to run macros. Note that this macro doesn't prevent absolutely all macros from running. As I mention above, macros in trusted locations can still run without going through the checks of the Trust Center system. Option 2: Disable All Macros With Notification As you've probably noticed the difference between this option and option 1 is that, now, Excel notifies you that a macro has been disabled. This is the default option in Excel and, as explained in Excel 2013 VBA and Macros, it's also the recommended setting. Excel's notification that macros are not enabled allows you to determine, on a case-by-case basis, whether you want to enable macros for a particular Excel workbook. More precisely, if you open a file that has macros and isn't open , you'll see the following message below the Ribbon. If at the time of opening the workbook with macros the Visual Basic Editor is also open, Excel displays a security notice: Regardless of which of the 2 messages you see, you have 2 options. Option 1: Enable Macros. You have 2 possible ways to enable macros. Which of the 2 options above applies depends on whether the Visual Basic Editor is open or not. If the VBE is open, you'll see the Microsoft Excel Security Notice that appears in the second screenshot above. Otherwise, you'll see the security warning that appears in the first image. Possibility 2: Enable the macros using the by following the 3-step process below. Option 2: Keep Macros Disabled. If the VBE is not open, ignore the message or close it by clicking on the cross at the right side of the security warning as shown in the image below. In all of these cases, the macros are not enabled. What Happens If You Ignore Or Dismiss The Security Warning Without Enabling Macros And, Later, Try To Run A Macro? If you try to run a macro even though you've not enable them, Excel displays the following dialog box to inform you about this: In order to solve this issue, follow the indications that appear in the dialog. What Happens The Next Time You Open An Excel Workbook In Which You Have Enabled Macros. Excel remembers when you enable macros in an Excel workbook. Therefore, if you enable the content of such workbook following the process described in this section, the next time you open it all the macros are automatically enabled. In other words, that particular Excel file becomes a. You can enable the macros in a particular Excel file for a single time, without turning that Excel workbook into a trusted document, by following the process I explain below. As explained by Microsoft , there are some situations in which you can't make a particular Excel workbook a trusted document. In those cases, macros are not automatically enabled the next time you open the relevant Excel file. When a file can't be made a trusted document, the macros that you enable by following the steps described above are only enabled for a single time. When you open the file again, Excel shows the security warning or security notice again and ask if you want to enable the content as explained above. Option 3: Disable All Macros Except Digitally Signed Macros This option, just as the previous 2, generally disables macros automatically. However, in this case, the process is slightly more complicated due to the existence of an exception for digitally signed macros. This allows you to enable the signed macros or add the publisher to your list of trusted publishers. The question is, then, when should you choose this option? In Excel 2013 VBA and Macros, Excel authorities Mr. Option 4: Enable All Macros This setting enables all macros automatically. However, notice the clear warning that Microsoft includes within the parenthesis: If you remember the explanation I provide above as to why Excel macros are not enabled by default, you'll see the problem with enabling absolutely all macros automatically. This macro setting leaves your computer vulnerable to macro viruses. In other words, unless you have a very compelling reason to do otherwise, its best to avoid option 4. How to Enable Macros For Certain Excel Files In addition to setting global settings to determine whether macros are enabled or not, you can determine the individual macro settings for particular Excel workbooks. You do this through creating and managing , which are particular folders in your hard disk or network. As explained by Microsoft , Microsoft Office creates several trusted locations during the installation process. Excel files that are in a trusted location are not checked according to the security settings of the Trust Center. Therefore, the macros of all the Excel workbooks that are saved in trusted locations are automatically enabled. In Excel VBA Programming for Dummies, Excel guru John Walkenbach writes that designating one or more folders as trusted locations is: Perhaps the best way to handle macro security. You can add a trusted location by following these 8 easy steps. Step 1: Access The Trusted Locations Tab In The Trust Center You can access the Trusted Locations tab in 2 simple steps. Step 1: Enter The Trust Center. The most straightforward way to get to the Trust Center is by clicking on the Macro Security button in the Developer tab of the Ribbon. You can also access the Trust Center through the Excel Options dialog, as I explain above. Step 2: Go To The Trusted Locations Tab. Once you're inside the Trust Center, make sure that you're on the Trusted Locations tab. Step 2: Set Whether You Want To Allow Trusted Locations On Network Trusted locations can be both on your hard drive and on a network location. The default setting reflects this. Additionally, according to Microsoft, you should avoid adding public folders on network shares as trusted locations. Step 3: Click The Add New Location Button This step is self-explanatory. Click on the Add new location… button on the lower part of the Trust Center. Step 4: Click The Browse Button After you've clicked the Add New Location button, Excel displays the Microsoft Office Trusted Location dialog. Step 5: Select The Folder You Want To Add As A Trusted Location After you've clicked on the Browse button, Excel opens the Browse dialog. This probably looks familiar. This is the dialog box you'll use to select the folder you want to add to your trusted locations. The following screenshot shows how the Browse dialog looks if, for example, you wanted to add the Trusted Locations folder which is stored in the Examples folder: Step 6: Set Whether You Want To Trust Subfolders Of The Selected Location After you've selected the folder to be added as a trusted location, Excel takes you back to the Microsoft Office Trusted Location dialog. If you want, you can also add a description of the trusted location, using the Description field on the lower part of the dialog. Adding a description is optional. Step 7: Click The OK Button Once you've completed the 6 steps explained above, you're ready to go back to the Trust Center. To close the Microsoft Office Trusted Location dialog and go back to the Trust Center, click the OK button on the lower right corner. Step 8: Click The OK Button Once you're back in the Trust Center, you'll notice that the location that you've selected by following the 7 steps above has been added to the list of trusted sources for opening files. You've pretty much completed the process to add a trusted location. Simply click the OK button on the lower right corner to finish. When To Use And When Not To Use Trusted Locations You're probably already aware of the following, but I'll say it anyway: You should be very careful when selecting which locations you add to the list of trusted sources for opening files in Excel. Remember that all Excel workbooks that are stored in trusted locations have their macros enabled automatically, regardless of what the global setting for macro security is. One example of something you don't want to do appears in Excel 2013 VBA and Macros. Here, the authors explain how Outlook stores email attachments that you double-click in a temporary folder. In a similar vein, that you avoid designating your entire Documents or My Documents folders as trusted locations. In this case, is better to create subfolders and add those subfolders alone to the list of trusted locations. So when does it make sense to add a trusted location? In the webpage I link to above, Microsoft provides a good rule of thumb. Basically, it may make sense to use trusted locations when you have certain Excel workbooks that you don't want the Trust Center security feature to check before opening. Doing this is safer than changing your default macro security settings in the Trust Center to something less safe. In this case, instead of changing your global macro security setting to Disable all macros with notification, it may make more sense for you to create a trusted location. You can then save your few Excel workbooks with macros on that trusted location and, when you open them, their macros are automatically enabled. How To Enable Macros For A Single Time What can you do if you receive an Excel workbook that contains macros which you want to use but you don't want to do any of the following? The answer is that you enable the macros for a single time in 3 easy steps, as explained below. Note that this process only works if Excel has notified you that macros have been disabled. If you have, for example, disabled all macros without notification, you'll need to change your default settings before being able to enable macros for a single time. A similar thing happens if you have disabled all macros except digitally signed ones, and open a book containing unsigned macros in which case there is no notification. If you follow this process, for as long as you keep the Excel workbook open. Since the Excel workbook doesn't become a trusted document in this scenario, if you close the file and later re-open it, the macros are not automatically enabled. Step 1: Access The Backstage View Go to the Backstage View by clicking on the File tab in the Ribbon. Step 2: Click On The Enable Content Button And Select Advanced Options Once you're in the Backstage View, you'll notice the prominent security warning which Excel uses to inform you that macros have been disabled. Click on the Enable Content button that is to the right of the security warning. Excel displays a drop-down menu. That's it, macros are now enabled for that particular session. Conclusion The quote in the image at the beginning of this Excel tutorial from Excel authority John Walkenbach states that Visual Basic for Applications is a powerful language. Should the potential risk of using macros stop you from using them? As explained by technology writer Chris Hoffman at : Macros are still potentially dangerous. But, like a lion at the zoo, you'd have to go out of your way to be hurt by them. This Excel tutorial has explained the most important things you need to know regarding how and when to enable macros. Therefore, by now, you probably have a good understanding of what activities and macro security settings are most appropriate for your particular situation. Additionally, you've also seen how you can enable macros in Excel in different situations, ranging from having them always enabled to enabling them for a single time. These different methods to enable a macro should be able to cover most of the situations that you find in your day to day work. Books Referenced In This Excel Tutorial Click on any of the images below to purchase the book at Amazon now. I love reading and sharing success stories from amazing members of the Power Spreadsheets community, like you. If this or any other Tutorial has helped you, please share your success story below. This only takes few seconds and, by doing it, you help the future development of Power Spreadsheets. Any improvements I make to this or the other free Tutorials in Power Spreadsheets based on your feedback will benefit you too. I'd like to highlight your amazing work if there's a suitable opportunity. Therefore, I may publish your success story so other members of the Power Spreadsheets community can learn and be inspired by your success. If there's any data about you or your success story you don't want me to publish, please expressly specify this below.
To display the Developer tab, click on File in the menu bar and select Options from the drop down menu. So, I think the problem is the drawing shape. This is the default setting. Instead of creating keyboard shortcuts, you can create worksheet buttons instead. Any line where you see an apostrophe at the beginning, followed by green text, are comments. Now you can rename the button. These settings let you adjust the way you want to work with macro-enabled workbooks. Step 8: Click The OK Button Once you're back in the Trust Center, you'll notice that the location that you've selected by following the 7 steps above has been added to the list of trusted sources for opening files.