stop excel displaying open as read only box when opening a file

When I open a certain file I get the window saying abcfile.xls is reserved by john smith. Enter password for write access or open as read only.

I already have Application Display Alerts = false in the vba code.

so, how do I stop the window from showing and the file to open as read only without having to press 'Read Only'

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

[ fanpages ]IT Services ConsultantCommented:

There is a 'ReadOnly' parameter for the Open Method that you will need to specify as True if a Write-Access password is set on the workbook file you wish to open without being prompted:

Workbooks.Open Filename:= abcfile.xls", ReadOnly:=True

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
web_trackerComputer Service TechnicianCommented:
You get the original creator of the file to remove the security settings of the file to give everyone the ability to make changes to the file. Right now it is securely locked by the file creator, who is the only one able to make changes to the file.
JagwarmanAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.