How to Suppress Excel Read-Write File Availability Prompt
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.

- 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.
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.
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.
Press Alt + F11 in Excel to open the Visual Basic for Applications (VBA) Editor.
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.
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.
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.

Upgrade to Modern Cloud Co-Authoring
Eliminate legacy file-locking prompts entirely by transitioning away from traditional shared network drives.
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. Download the Installer: Visit the official WPS Office website and click the free download button.
- 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. Open Your Spreadsheets: Launch WPS Spreadsheets and open your existing Excel files to enjoy a seamless, prompt-free editing experience.

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.




