Results 1 to 2 of 2
2006-05-15, 15:50 #1
- Join Date
- Nov 2004
- Sacramento, California, USA
- Thanked 0 Times in 0 Posts
Open without Read Only (Excel 2000)
I have a macro that opens files set to read only. The purposes of the Macro is to Password Protect the selected files. However, I have set up the macro with these statements:
Application.DisplayAlerts = False
Workbooks.Open Filename:=FilesToOpen(x), ReadOnly:=False
ActiveWorkbook.SaveAs Filename:=FilesToOpen(x), _
FileFormat:=xlNormal, Password:=sPwd, WriteResPassword:="", ReadOnlyRecommended:=False, CreateBackup:=False
I thought I would be opening WITHOUT Read Only and Saving WITHOUT ReadOnly - but, the file opens as read only.
Any options to allow the files to be password protected?
2006-05-15, 16:11 #2
- Join Date
- Mar 2002
- Thanked 29 Times in 29 Posts
Re: Open without Read Only (Excel 2000)
If a workbook has been saved with Read Only Recommended on, opening it will display the warning dialog even if you open it with ReadOnly:=False. The line Application.DisplayAlerts = False suppresses the warning dialog and supplies the default reply (open as read-only)
In Excel 2002, you can use
Workbooks.Open Filename:=FilesToOpen(x), ReadOnly:=False, IgnoreReadOnlyRecommended:=True
Does that work in Excel 2000?