When I create and run a VBA script in Excel, I meet an error with the error message The macros in this project are disabled. This article will tell you how to fix it.
1. How To Fix Errors The Macros In This Project Are Disabled on Windows OS.
- Open Excel, click the File —> Options item to open the Excel Options dialog.
- Click the Trust Center option item on the Exception Options dialog left side.
- Click the Trust Center Settings… button on the dialog right panel
- Then it will popup the Trust Center dialog.
- Click the Macro Settings item in the Trust Center dialog left panel.
- Then on the right panel Macro Settings section, check the radio checkbox Enable all macros (not recommended; potentially dangerous code can run).
- You should also check the checkbox Trust access to the VBA project object model on the right panel Developer Macro Settings section.
- Click the OK button to save the changes, close the Excel workbook file, and reopen it.
- Now you can run the VBA script or Macro again, and the error will disappear.
- But be careful, before you do this, you had better backup your Excel workbook file.
- After executing the macro or VBA script, uncheck the checkbox.
1. How To Fix Errors The Macros In This Project Are Disabled on macOS.
- Open Excel Workbook on macOS.
- Click the Excel —> Preferences… menu item on the top left corner.
- Then it will open the Excel Preferences dialog window.
- Search the keyword Macro in the dialog window search box.
- Then click the Macro security item in the search result list.
- It will open the Security dialog window.
- You can select the radio button Enable all macros in the Macro Security section.
- You can also check the checkbox Trust access to the VBA project object model in the Developer Macro Settings secti0n.