Macro Security in Excel
Macros can add a lot of functionality to Microsoft 365, but they are often used by people with bad intentions to distribute malware to unsuspecting victims.
Before you go enable macros in your worksheets, it's important to understand how dangerous they can possibly be.
Although visual basic coding is very effective at automating complex and repetitious tasks, it can be a significant source of risk from the security point of view. A malicious macro that you run may damage or completely delete files on your hard drive, mess up your data, and even corrupt your Microsoft Office installation. For this reason, Excel's default setting is to disable all macros with notification.
How to avoid these dangers? Just follow one simple rule: enable only safe macros – ones that you've written or recorded yourself, macros from trusted sources, and visual basic code that you have reviewed and fully understand.
"Will Macros be Enabled?" Flowchart.
Unblock a single file
In most cases you can unblock macros by modifying the properties of the file as follows:
Open Windows File Explorer and go to the folder where you saved the file.
Right-click the file and choose Properties from the context menu.
3. At the bottom of the General tab, select the Unblock checkbox and select OK.
If you don't see the Unblock checkbox in properties, your file may already be unblocked.
Enable macros via security warning bar
With the default macro settings, when you first open a workbook containing macros, the yellow security warning bar appears at the top of the sheet right under the ribbon: