Microsoft Excel · macro security
Blocked Macros? How to Enable Macros in Microsoft Excel
Excel has stopped the code inside your workbook from running. Your file is fine and nothing you saved has been lost. Find the message you are seeing below and you will be working again in under a minute.
Which message are you seeing?
Look directly under the Excel ribbon, at the top of the window.
Click Enable Content and you are done
Excel is asking your permission, so give it. Click Enable Content and the workbook starts working straight away. Excel remembers this file, so it will not ask you again next time.
The file needs unblocking first
This is the one most people come here for. There is no button because Excel is not offering you a choice — it has blocked the file because of where the file came from, not because of anything in it.
The fix takes about twenty seconds and it happens in Windows rather than in Excel. Unblock the file.
Choose Enable Macros
Excel for Mac asks you outright as the file opens. Choose Enable Macros and that is the whole job.
Seeing a bar that offers “Enable Editing” instead? That is a different message. The file has opened in Excel’s read-only preview, where nothing runs at all. Click Enable Editing first and the macro message will appear afterwards.
Unblock the file
The fix for the red bar. Close the workbook first — Windows will not let you change this while the file is open.
- Find the file in File Explorer.
- Right-click it and choose Properties.
- On the General tab, look at the very bottom. There is a line saying the file came from another computer, with an Unblock tick box beside it. Tick it.
- Click OK, then open the workbook again.
No Unblock tick box there? Then the file is not blocked and this is not your problem. Go back to the three messages above — you are probably looking at the yellow bar rather than the red one.
Two habits stop this coming back. Save the file into a folder of your own before you open it, rather than working on it out of your downloads folder or an email preview. And if that folder is a trusted location, anything that lands in it is trusted from the start.
Add a trusted location, and stop being asked
Set this up once if you work with macro-enabled files regularly.
A trusted location is a folder you tell Excel to trust. Every workbook opened from it runs its macros immediately, with no bar and no prompt.
- In Excel, go to File → Options → Trust Center → Trust Center Settings.
- Choose Trusted Locations from the list on the left.
- Click Add new location, then Browse to the folder where you keep your working files, and click OK.
- Keep your macro-enabled workbooks in that folder. They now open ready to use.
Trust a folder, not everything. The global macro setting is in the same dialog under Macro Settings, and the right choice there is the default one, which disables macros but notifies you. That is what puts the yellow bar on screen so you can allow one file at a time. There is no need to turn macros on for everything.
Still blocked? Check whether the settings are locked
Only if the fixes above have not worked. You do not need to change anything here. You are only looking.
- In Excel, go to File → Options → Trust Center → Trust Center Settings.
- Choose Macro Settings from the list on the left.
- Look at the options on the right. If you can click them, nothing is locked and the two fixes above will work.
- If the options are grey and you cannot click any of them, your company’s IT has locked macros on your computer, and only they can change it.
Locked by IT? What to do when IT has locked macros →
Why Excel blocks macros it used to run
Useful background, and the reason changing your macro settings does nothing.
A macro is code stored inside a spreadsheet. It is what lets a workbook do things a grid of numbers cannot do on its own: recalculate a schedule, redraw a chart, respond to a button.
Excel no longer asks about a file that came from somewhere else. It refuses. And it makes that decision from a hidden mark Windows attaches to the file the moment it arrives, not from anything inside the workbook:
This is why the macro settings screen does not help. Almost everyone tries it first. Those settings control whether Excel asks you about macros, and for a tagged file Excel is not asking — it has already decided. You can set macro security as low as it goes and the red bar will still be there.
Is it safe to enable macros?
Yes, for a file you meant to open. Macros have been part of Office for decades and most of them do ordinary work: a template that totals a sheet, an invoice that fills itself in, a project plan that redraws its own chart. Gantt Excel is one of those. Everything it does happens in code inside the workbook, and none of it touches anything outside your spreadsheet.
Microsoft’s block is not aimed at files like that. It exists for the case where a spreadsheet turns up from someone you do not know and gets opened without much thought. Windows cannot tell the two apart, so it treats them the same and leaves the judgement to you.
Which is why both fixes above are the narrow ones. Unblock the file you meant to open, or trust the single folder you keep your work in. Everything else on your computer stays exactly as protected as it was.
Using Gantt Excel?
The workbook is entirely macro-driven, so it needs macros running to do anything at all. There is one extra thing worth knowing: a wide red bar across the chart itself, which is ours rather than Excel’s. It is the workbook telling you its code never started. The full guide covers that, along with the Gantt Excel tab going missing.
Enabling macros in Gantt Excel →Common questions
I changed my macro security settings and nothing happened. Why?
Because those settings answer a question Excel is not asking. For a file tagged as coming from another computer, Excel blocks the macros outright rather than prompting you, so the setting that controls the prompt never comes into play. Unblock the file, or put it in a trusted location.
Do I have to do this every time I open the file?
No. Excel remembers a file you have allowed. And if you add a trusted location, anything you keep in that folder opens ready to use without being asked at all.
Why has this started happening to a file that worked fine before?
Usually because the file travelled. A copy that has been emailed, re-downloaded or pulled off a shared drive is a new arrival as far as Windows is concerned, so it gets tagged again even though the contents are identical.
I sent the file to a colleague and it will not run for them.
That is expected, and it is the same fix at their end. A file saved out of an email carries the tag, so they need to save it to a real folder, right-click it, choose Properties and tick Unblock before opening.
Is there a way to turn this off for everything?
There is, and we would not recommend it. Turning the block off across the whole machine removes the protection from every file you ever open. A trusted location gives you the same convenience for the folder you actually work in, and leaves the rest alone.
What about Excel on a Mac?
Simpler. Excel for Mac asks you directly, in a dialog, as the file opens — choose Enable Macros. If you are never asked at all, the macro security setting has been changed; it is in Excel’s own preferences, under the security section.
It worked
We are happy to know that this solution worked for you.
it worked
Hi, I am looking to restart week numbering for each year. Is that possible
We will pass your feedback to the R&D dev team for possible inclusion as a feature later this year. Thank you.
I want to learn more about this so I can use it well
Sure, Please check out our quick start guide on our website and videos on youtube.
https://www.youtube.com/c/GanttExcel-gantt-chart-excel-template/videos
Yet its not work for me.
Please try unblocking the file. It should work.
https://www.youtube.com/watch?v=3f5yw8QGawQ
How do I show a dependency on the Gantt chart? I see how to enter the dependency in the edit pop-up but so far no transfer to the Gantt chart.
Dr. Steve, you can click on the settings button in the Gantt menu and enable ‘Show Connectors’ and the dependency connectors will show up in the timeline.
Hello, Unblocking did not work for me.
I use WPS not microsoft excel. It says the Macro can not be run because the VBA support library is not installed.
Please can you help me?
Helen our templates work only with Microsoft Excel.
Hi, Can I change the hour blocks to be 30min blocks?
Darren we don’t have this feature but will pass it on as feedback to the R&D dev team.
Thank´s
You are most welcome Luis.
Hi im trying to enable macros on a Gantt chart on a Mac and when I do it keeps asking me for a password which I never set up in the first place. Can you please assist?
Ned you can unblock the workbook in the Settings window. You can also reach out to support via a ticket.
I need to apply this soft ware
Godana please add a trusted location on your computer. Its easy and takes a minute.
https://www.youtube.com/watch?v=QwHVG0Q2DOY
The option to unlock the file does not show up, but I get a brief message in red, saying the automated macro is off. Please help.
Sharon please add a trusted location on your computer. Its easy and takes a minute.
https://www.youtube.com/watch?v=QwHVG0Q2DOY
Nice. Thank you
Dr. Steve, you can click on the settings button in the Gantt menu and enable ‘Show Connectors’ and the dependency connectors will show up in the timeline.
This looks good
Nice. Thank you
Nice. Thank you
good
GOOD APPLICATION
thank you
yes, here we go
How do you enable macro’s in Microsoft 365?
Once you install a copy of Microsoft Excel on your computer you will be able to enable macros by following the process in this article.
Once the chart us downloaded, will it pass the data to your server or not? Using your freely available GANNT chart will breach any of organization security policy or data breach?
The file is stored on your computer like any other excel file. The data is not stored on any servers.
This is great, but I’m a bit concerned. Once I download this to my device, does that mean my entire team will also need to have it on their devices to be able to edit and view the chart?
The file is a excel based template file. If you share the file with the team then they can view it. Please reach out to our support team for additional licensing details.
Can I use Free Template forever for my work?
Could you please let me know if I need to pay any fee in for free template, I hope my data will not impact.
Naveen, Sure you can. The data stays in your excel file on your system. We have no access to your data and that’s why everyone in the world love Gantt Excel as their project data is safe and not on the cloud.
VERY GOOD
Hi John – Can I use this on my work OneDrive (web-based Excel)?
Jeff you can store the file on OneDrive but you need to download it for the automation to work correctly.
It is a good tool for Project Management activities.
Thank you very much.
It is a good tool for Project Management activities.
But I don`t know how to do next acturely?
Thank you, you can follow this guide.
https://www.ganttexcel.com/how-to-create-a-gantt-chart-in-excel/
Excellent planner
Very good
How do you enable on a Mac?
Josh, on the mac the blocked macros notice doesn’t show up. Enabling Excel macros on a Mac is pretty straightforward.
If you see a yellow security warning bar at the top that says “Macros have been disabled”, just click “Enable Content” or “Enable Macros”.
If no prompt appears, you may need to change your macro settings manually:
Click Excel in the top menu bar. Go to Preferences. Choose Security & Privacy.
Under the Macro Security section, select: “Disable all macros with notification” (recommended — you’ll be asked to enable them when opening a macro-enabled file).
Close the Preferences window — your settings will be saved automatically.
Thanks for this website
it is help full
como puedo ponerlo en español
Estamos trabajando en una versión en español y será lanzada para Navidad de 2025
Hi, every time I open I file now I get a big red banner (not a MS one) with “Automation Off – Enable Macros to Continue” message. I thought I had fixed it at one point but now, having tried all of your recommended fixes, I’m stuck. What can I do?
Please enable macros to use all features. If macros are already enabled and the Gantt menu buttons appear in the Excel ribbon, you can safely delete this red banner message. If you encounter any issues, please raise a support ticket on our website.
good