PDA

View Full Version : Solved: How to code to open a read-only file with a "No" option?



Surii
08-16-2012, 08:23 PM
Hi all,
I have the following code to open the file which has read-only option but my macro code will copy something from another file and paste in this file and save, so I need to choose a "No" to the read-only message when it tries to open the file. Currently, the message still pops up to me and I need to manually click "No"... :help


Workbooks.Open FileName:="Q:\Documents\Codes.xlsx", ReadOnly:=False


Thanks in advance for your help! :)

Surii
08-16-2012, 10:13 PM
By the way, I have solved it. Instead of using ReadOnly:=False, it should be IgnoreReadOnlyRecommended:=True