logo
search
File Sharing Problems

How to Suppress Excel Read-Write File Availability Prompt

Kushani NimanthikaKushani Nimanthika Sep 25, 2026 869 views

Question details

The user wants to suppress the "File Now Available" prompt that asks whether to open a shared file as Read-Write or Cancel, specifically aiming to default the action to Cancel.

How to Suppress Excel's Read-Write File Availability Message
Product
Microsoft Excel
Device & OS
not provided
Scenario
Automating or opening an Excel file on a shared network drive that is currently locked by another user for editing.
Observed behavior
Excel displays a file-sharing notification prompt. Standard VBA methods like Application.DisplayAlerts = False fail to bypass or suppress this specific system-level message.
Before you start

Verify whether your Excel file is stored on a traditional local network drive or a cloud platform, as file-locking behaviors differ significantly between the two.

Solution 1Recommended

Pre-check File Lock Status Using VBA

Prevent the prompt from appearing by verifying if the file is locked before Excel attempts to open it.

Because the 'File Now Available' prompt is triggered by the operating system's file-locking mechanism, Excel's internal DisplayAlerts command cannot suppress it. The most reliable workaround is to write a VBA function that checks the file's availability first.

If the custom function detects that another user has the file open, your script can automatically cancel the operation or wait, bypassing the native Excel prompt entirely.

1
Open the VBA Editor

Press Alt + F11 in Excel to open the Visual Basic for Applications (VBA) Editor.

2
Create a File Check Function

Insert a new Module and write a custom function that attempts to open the target file using the 'Open [FilePath] For Input Lock Read As #1' statement.

3
Catch Permission Errors

Use standard VBA error handling to catch Error 70 (Permission Denied). If this error occurs, it confirms the file is currently locked by another user.

4
Modify Your Main Macro

In your primary script, call this function before executing 'Workbooks.Open'. If the file is locked, instruct the macro to exit the sub or display a custom message instead of triggering the built-in read-write prompt.

Pre-check File Lock Status Using VBA
Workflow Control: By proactively checking the file's status, you gain complete programmatic control over the workflow and avoid user-facing interruptions.
Free Microsoft Office alternative

Switch to WPS Office for Hassle-Free Spreadsheet Management

If legacy file-locking prompts and complex VBA workarounds in Microsoft Excel are slowing down your productivity, consider WPS Office. It provides a highly compatible, lightweight spreadsheet solution designed to handle your everyday data tasks smoothly.

  1. 1. Download the Installer: Visit the official WPS Office website and click the free download button.
  2. 2. Install the Software: Run the installation file and follow the simple on-screen instructions to set up the office suite on your computer.
  3. 3. Open Your Spreadsheets: Launch WPS Spreadsheets and open your existing Excel files to enjoy a seamless, prompt-free editing experience.
Highly compatible with Microsoft Excel file formats (.xlsx, .xls, .csv)Cloud collaboration features to help avoid traditional file-locking conflictsLightweight application that opens quickly without heavy background processesCompletely free alternative with a familiar, easy-to-use interface requiring no learning curve
microsoft office alternative - wps office

Frequently Asked Questions

Why doesn't Application.DisplayAlerts = False work on this prompt?

The 'File Now Available' read-write prompt is a network and operating system-level notification rather than a standard internal Excel alert. Because it relies on OS file locks, standard VBA alert suppression commands are bypassed.

Is it possible to completely disable file locking in Excel?

On a traditional local network share, file locking is a necessary feature to prevent data corruption when multiple people edit a file. To remove locking, you must migrate the file to a cloud service that supports real-time co-authoring.

What version of Excel do I need to stop seeing this error?

Older unsupported versions like Excel 2007 handle file sharing with strict locking mechanisms. Upgrading to newer supported versions and utilizing cloud storage will replace legacy read-write prompts with modern co-authoring indicators.