This tutorial teaches how to enable macros in Excel 2010-2013. You'll also find step-by-step instructions showing how to disable macros in Excel or turn them on via Message bar and Backstage view. In addition you'll find a tip to run a macro even if all macros are disabled and get a link to a piece of code that gets users enable macros in a workbook.
First off, I'd like to share a brief intro to Excel macros and security risk linked to enabling them. A macro is a series of commands assembled together and designed to automate frequent routine tasks in Excel. You can run macros any time to perform certain actions.
Many macros are created using Visual Basic for Applications, or VBA. Lots of Excel users can record simple macros to streamline their work with spreadsheets. Developers create codes that are more complicated.
When enabling a macro in Excel that was written by someone else, you need to remember that it can carry a potential security risk. A person with malicious intent, like hacker, can make a destructive macro to spread a virus on your PC or network.
Read on to find detailed descriptions of macro settings, steps to enable Excel macros and save a macro-enabled workbook. You can also click any of the links below to get straight to the point.
If you open an Excel document that contains macros, you'll see the yellow Message Bar with a shield icon and the Enable Content button.
If you are sure, the macros are from a trustworthy source, just press the Enable Content button on the bar.
The file will be opened as a trusted document and the security warning will disappear.
You can also enable macros in Excel using the Microsoft Office Backstage view. You can see the yellow Message Bar if you click the File tab.
The current Excel file will become a trusted document and all macros will be enabled.
If you create and share workbooks with macros you may want to avoid getting the security message every time. If you get all your workbooks only from reliable sources, you can choose to instantly run all macros for all publishers. Below you'll see how to enable all macros in Excel by default.
From now on all macros will run without warning.
Please note that this setting makes your computer open to viruses. You should be sure you get all workbooks with macros only from the trusted publishers.
You can find all macro settings on the Trust Center window. These settings let you adjust the way you want to work with macro-enabled workbooks.
Follow the steps from How to always run macros for a trusted worksheet to get the Trust Center window.
Please see all the macro settings explained below:
Say the setting Disable all macros without notification is turned on your PC, but you need to run certain macro here and now. If you have Excel 2007-2013, you can enable macros even if your security settings don't allow this. The point is that Excel sees certain locations as trusted zones. This means if you store your macro-enabled files there, the security check can be omitted and the macro will run.
Please see the list of these trusted locations below:
Program Files\Microsoft Office\Templates
Program Files\Microsoft Office\Office12\Startup
Program Files\Microsoft Office\Office12\Library
Program Files\Microsoft Office\Office12\XLSTART
You can add any location on your PC to the trusted zone, by following the steps below:
Macros need you to save the files in a new macro-enabled workbook format. This type adds security warning to your file. If you don't choose the correcttype, the command will not be kept. Below you'll find how to save a macro-enabled Excel document:
If you forget to select the type of Macro Enabled Workbook, you'll get a warning message notifying that the macro will not be saved:
Click No if you need to keep the macro.
Suppose, you only proofread the files and don't need macros enabled on your PC. You get documents from various sources and prefer to set your security settings to the highest level. Since some macros can be potentially dangerous, you can disable them all using the Trust Center options.
The code from this article forces a user to enable macros in a workbook. This code hides all sheets until the macro is enabled. It also adds a warning sheet that alerts the user to run macros. As soon as a user turns the commands on, the warning sheet is hidden and all other content is shown.
Check out Tutorial with Excel examples about Macros for some nice and simple samples to automate your daily spreadsheet tasks.
If you are starting to learn macros, read How to insert and run VBA code in Excel - tutorial for beginners.
That's all about enabling and disabling macros in Excel. Hope you've found the information helpful. Feel free to leave your questions in the comments below. Be happy and excel in Excel!
33 responses to "How to enable macros in Excel 2016, 2013, and 2010"
problème de compatibilité en Excel 2007 et Excel 2013
Un logiciel de compta comportant des macros qui fonctionnent sur 2007 ne fonctionne plus sur 2013 ?
Hello, Fourny,
Sorry, we provide replies only in English.
Please try the solution from this topic:
https://social.technet.microsoft.com/Forums/office/en-US/b8811d0b-ba74-49bc-a734-a1cab55696ec/compatibility-of-macros-in-excel-2010?forum=officesetupdeploylegacy
how to use ful formate
Hello,
Please give me more details about your task and I will try to help you.
Great way of teaching.. very simple and effective.
Thank you, Arun!
Hello
Please give me explanation for the following formula, I will be very thankful for this kindness.
1: =IFERROR(VLOOKUP(B4,CatModules!B:C,2,FALSE),"")
2: =IF(CostGroup!A2"",CostGroup!A2,"")
3: =IF(SUMIF('Detailed Budget'!$D:$D,'Budget Summary'!$B4,'Detailed Budget'!W:W)>0,SUMIF('Detailed Budget'!$D:$D,'Budget Summary'!$B4,'Detailed Budget'!W:W),"")
4: =IFERROR(IF(VLOOKUP(A2,'Detailed Budget'!$A$2:$H$501,8,FALSE)0,VLOOKUP(A2,'Detailed Budget'!$A$2:$H$501,8,FALSE),""),"")
5: =IFERROR(IF(OR(NOT(H3=""),NOT(I3="")),H3+I3,""),"")
6: =IFERROR(IF(M$2:M$501"",ROUND(SUMIFS(M$2:M$501,$A$2:$A$501,VLOOKUP(A4,'Detailed Budget'!$A$2:$A$501,1,FALSE))/(SUMIFS(N$2:N$501,$A$2:$A$501,VLOOKUP(A4,'Detailed Budget'!$A$2:$A$501,1,FALSE))),2),""),"")
7: =IFERROR(IF(OR(NOT(Q4=""),NOT(R4="")),Q4+R4,""),"")
Please give the detail of each formula if possible.
Thanks
Please send me to my email if possible.
Thanks
Hello,
I've a macro which written on excel 2010 vba.
Now my system is upgraded to MS-Office 2013.
This macro which is written in excel 2010 vba is not working..
Please provide the solution if you can..
Thanx in Advance.
Satya
Hi Satya,
To help you better, we need a sample workbook with your macros. You can email it to support@ablebits.com. Please add the link to this article and your comment number.
Nothing visible after enabling micros in excel..no other micros output.
Hi Avijit,
To be able to assist you better please describe your task in more detail.
I want to put date in Column A and want in same column as soon as date is entered it should give me number of days till date , how to make it possible through VBA Excel code
Hi Juzer,
Please look at the following article, it should help:
https://www.ablebits.com/office-addins-blog/2015/05/28/excel-datedif-calculate-date-difference/
When I get to the place to enable all macros all of these options are grayed out. Is there a way to make them visible?
After opening Excel sheet, a security warning message came that : Macro have been disabled. Enable Content
My question is.. I have to highlight particular cell to yellow ex. cell A1. Earlier(before Enable content) it was while background. After enabling content A1 cell should be highlighted to yellow.
Can this be possible by macro ?
Please help me and suggest
Hi,
Please help me.
I created an excel 2013 file consists of macros and saved it as Add-in so I can customize them and pin in Menu bar. Unluckily, excel did not detect the macros in the add-in. Can someone help me. Thanks.
Hi, Lorraine,
Please see how to add the macro as an add-in in this article.
I hope you'll find the info helpful.
Hi
Can anyone help me ?
I'm unable to use the colorindex formula in excel 2013
Even I enable macro
I have a user with a laptop. I deployed an Excel file onto that laptop. Even when I set the macros to be enabled always and the file is coming from a trusted location, Excel doesn't enable macros, nor does it even put up the button to do so. What other settings should I be looking at?
Thanks!
Chuck
After further investigation, it appears that macros are enabled, it just won't run the Workbook_Open() routine. Hhhmmm...
Hi
I've try to use SigmaXL at excel 2013, but don't know why it prompt out message " Cannot run the macro 'OpenHelpDataSetFolder/-ClickHandler' The macro macro may not be available in this workbook or all the macro may be diaabled.
Can help me solve this issue please.
Thanks
Hi,
I've try to open macro enabled excel file and got notification to update link. Already click update link but my macro can't update the file. i still continue then the file can not run properly. Please advice.
When I run my VBA Project it's show a massage box. "project is unviewable" what can I do now to view my project
Muntaqim:
It sounds like whoever built it locked it and you won't be able to open it. The builder doesn't want people to be able to see the code.
I can't run the macro even after enabling it. What to do?
After downloaded and executed the exe, and after accepting the license terms, dialogue box comes and throws an error - can't open "Freefincal-Robo-advisory-template-final-June-20-2018-EXE-Version.xlsm" - error description "unknown".
I am using MS excel 2013 version, enabled all macros already.
Please help.
i did the.action about 'enable content' wrongly, it is not my aim, so how to reset the excel and show the worning again? and please send the comment to my mail box, many thanks in advance
If I use the Vb codes and save as in required format my macro excel sheet is working fine. If I use the same in new another excel sheet the formula which I used in Vb codes previousely is not working. If I use the vb codes in one excel file it should be available in all new excel file. To get so what I should do please help me
thank you for nice article. please can now do all my work for me and email it to my boss? i be at beach...bless your kindness.
I have a problem with my computer and i want you to help. I open excel 2016 in data file .The cells are spread i cannot change because it is security and some time the computer get sruck can you have me with these .
My Microsoft Excel 2010 does not have the "Macro" setting option to select enable or disable.
There is a macro file I'm trying to use but it has a yellow bar that says "content disabled" does not support running macros "PURCHASE".
The trust center does not give me macro option to easily select enable.
What can I do to enable the file?
Do I need an upgrade? What upgrade would work?
I have a file created in XL2007 with macros and saved as xlsm and worked fine.
then I opened and modified and saved this file using XL2019 and all is fine.
then opened this file in XL2007 and ALL MACROS ARE DISABLED, even if sevurity setting is enable all macros in XL2007 and file opened from trusted location.
hOW TO ENABLE MACROS IN XL2007 FOR FILE IN QUESTION?