1. Open your Excel workbook
Launch Excel and open the file that requires macros for automation or scripting.
2. Check for a security warning below the ribbon
If the workbook contains macros, Excel may display a yellow bar below the ribbon. Click Enable Content or Enable Macros to activate them.
3. Open Excel’s settings or preferences
On Windows, click the File tab, then select Options. On Mac, click Excel in the top menu bar, then select Preferences.
4. Go to Trust Center or Security settings
On Windows, select Trust Center, then click Trust Center Settings. On Mac, under the Sharing and Privacy section, click Security.
5. Adjust Macro Settings
Choose your preferred setting — such as Enable all macros or Disable all macros with notification. For safety, enabling with notification is recommended.
6. Click OK and restart Excel if needed
Apply your settings and restart Excel if prompted for the changes to take effect.