VBA & Macro Problems

How to Fix Locked VBA Project in Excel for Mac

Algirdas JasaitisAlgirdas Jasaitis Oct 10, 2026 871 views

Question details

The user is unable to view or edit a VBA project because it is locked, and the option to insert a new module is grayed out.

How to Fix Locked VBA Project in Excel for Mac
Product
Excel for Microsoft 365
Device & OS
Mac
Scenario
Attempting to access the VBA editor, write macros, or insert a new VBA module in an Excel workbook.
Observed behavior
The VBA project is completely locked, the 'Insert Module' command is unavailable, and background add-ins may unexpectedly prompt for an unknown password.
Before you start

Ensure you are opening a trusted workbook, as enabling macros and modifying VBA trust settings can expose your computer to malicious scripts.

Solution 1Recommended

Enable Macros and Trust VBA Object Model

Adjusting Excel's security preferences to explicitly trust the VBA project object model is the primary fix for locked projects.

By default, Excel for Mac restricts access to the VBA object model to prevent unauthorized code execution. Enabling this trust setting restores full functionality to the VBA editor.

1
Open Excel Preferences

Launch Excel on your Mac. Click on 'Excel' in the top Apple menu bar, then select 'Preferences'.

2
Navigate to Security Settings

In the Preferences window, locate and click on 'Security & Privacy'.

3
Modify Macro Permissions

Select the option to 'Enable all macros' and explicitly check the box for 'Trust access to the VBA project object model'.

4
Restart Excel

Close the Preferences window and quit Excel completely. Reopen the application and test if you can access the VBA project.

Settings Applied: Trusting the VBA object model typically re-enables the 'Insert Module' command immediately upon restart.
Free Microsoft Office alternative

Try WPS Office for a Seamless Spreadsheet Experience

If you are constantly struggling with macro errors, locked VBA projects, or frustrating add-in conflicts in Excel for Mac, WPS Office provides a stable, lightweight, and highly capable alternative.

  1. 1. Download WPS Office: Visit the official WPS Office website to download the free installation package.
  2. 2. Install the App: Run the installer and follow the simple on-screen instructions.
  3. 3. Open Your Spreadsheets: Launch WPS Spreadsheets to seamlessly view, edit, and analyze your existing Excel files.
Excellent compatibility with Microsoft Office formats, including .xlsx, .xlsm, and .csv filesLightweight application that runs extremely smoothly without heavily consuming system resourcesFamiliar, user-friendly tabbed interface for managing multiple spreadsheets with zero learning curveFree to use with comprehensive built-in tools for advanced data analysis and formatting
microsoft office alternative - wps office

Frequently Asked Questions

Why is the 'Insert Module' command grayed out in Excel for Mac?

This happens when your workbook is not saved in a macro-compatible format, or when Excel's security preferences are set to block access to the VBA project object model.

Why does Excel ask for a password for an add-in I didn't create?

Some third-party software, like Adobe Acrobat, installs background add-ins in Excel. These developers lock their add-in code with passwords. If Excel tries to compile or interact with it incorrectly, it will prompt you for the developer's password. Disabling the add-in resolves this.

Do I need to reinstall Office to fix a locked VBA project?

Reinstalling Office should only be used as a last resort. Most locked VBA project issues can be solved simply by trusting the VBA object model in your Security & Privacy settings or saving the file as an .xlsm.