VBA & Macro Problems

Fix Excel Password-Protected Macro Files Opening as Read-Only

Aamir Naveed AkramAamir Naveed Akram Oct 12, 2026 872 views

Question details

A user's password-protected Excel macro files are opening in read-only mode and blocking macros instead of prompting for a password upon opening.

How to Fix Excel Password-Protected Macro Files Opening as Read-Only
Product
Microsoft Excel
Device & OS
not provided
Scenario
Opening a password-protected macro-enabled workbook (.xlsm) that may have been downloaded from the internet or shared over a network.
Observed behavior
The file opens automatically as read-only and bypasses the initial password prompt. When the user attempts to enable macros, Excel blocks the macros entirely as unsafe content.
Before you start

Ensure you know the source of the macro-enabled file and verify that it is secure and trustworthy before adjusting your Trust Center settings or enabling blocked content.

Solution 1Recommended

Add the File Folder to Excel's Trusted Locations

Adding the file's directory to Excel's Trusted Locations bypasses security blocks on specific folders, allowing safe macros to run and triggering the password prompt normally.

Microsoft Excel employs strict security measures for files containing VBA macros. By designating a specific folder as a Trusted Location, Excel will treat all files within that folder as safe, preventing the software from forcing the file into read-only mode and blocking the macros.

1
Access Excel Options

Open Microsoft Excel, click on 'File' in the top left corner, and select 'Options' at the bottom of the menu.

2
Open Trust Center Settings

In the Excel Options window, navigate to 'Trust Center' on the left sidebar, then click the 'Trust Center Settings' button.

3
Add a New Trusted Location

Select 'Trusted Locations' from the left menu and click the 'Add new location...' button at the bottom.

4
Select the Folder

Click 'Browse' to locate the folder containing your password-protected macro file. Check the box for 'Subfolders of this location are also trusted' if necessary, then click 'OK' on all dialog boxes to apply the changes.

Add the File Folder to Excel's Trusted Locations
Security Tip: Only add folders that you personally manage or completely trust. Avoid adding your entire 'Downloads' folder to Trusted Locations.
Free Microsoft Office alternative

Use WPS Office to Easily Open and Edit Macro-Enabled Spreadsheets

If Microsoft Excel's strict security policies and macro blocks disrupt your daily workflow, consider using WPS Office. It provides a lightweight, highly compatible alternative with robust support for VBA macros and complex spreadsheets, completely free of charge.

  1. 1. Install WPS Office: Download and install the free WPS Office suite from the official WPS website.
  2. 2. Open Your Spreadsheet: Launch WPS Spreadsheets, click 'Open', and navigate to your password-protected macro file.
  3. 3. Enter Password and Edit: Input the document's password when prompted. The file will open smoothly, allowing you to run your macros and edit your data right away.
Fully compatible with Microsoft Excel formats, including .xlsx and .xlsm files.Built-in VBA and Macro support to seamlessly automate your spreadsheet tasks.Lightweight architecture opens large, password-protected files quickly without freezing.Familiar and intuitive user interface allows for immediate transition with zero learning curve.
microsoft office alternative - wps office

Frequently Asked Questions

Why does Excel block macros in my downloaded files automatically?

Microsoft recently updated Excel's default security settings to automatically block VBA macros in files originating from the internet. This feature uses the 'Mark of the Web' tag to prevent malware and ransomware attacks from executing automatically upon opening a workbook.

Can I disable the read-only mode for my Excel macro file without changing Trust Center settings?

If the file was downloaded, you can often disable the read-only mode by right-clicking the file in File Explorer, choosing Properties, and checking the 'Unblock' box. However, if the file is on a network drive, adding a Trusted Location is typically required.

What if I cannot click on 'Add new location' in the Trust Center?

If the 'Add new location' button is greyed out or missing, it means your organization's IT department manages these settings via Group Policy. You must contact your Microsoft 365 administrator to request that the network path be added to the organization's trusted locations.

Are password-protected Excel files more likely to be blocked?

Password-protected files can sometimes trigger different security behaviors because antivirus scanners cannot inspect their contents before Excel opens them. Consequently, Excel may enforce stricter default blocks (like read-only mode without a prompt) until the file location is explicitly trusted.