Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open Password/Read-only Spreadsheet

Status
Not open for further replies.

jennuhw

MIS
Apr 18, 2001
426
US
What is the correct code to open a password protected/read-only spreadsheet? This is what I currently have:
Set oWrkBook = oExcel.Workbooks.Open (FileLoc, password:="purple", IgnoreReadOnlyRecommended) Thanks!
 
I presume you have oExcel and FileLoc properly defined and initialized.

Set oWrkBook = oExcel.Workbooks.Open(FileLoc,,True,,"purple") Jon Hawkins
 
I have tried this exactly as you have told me. I have even tried changing the True to False. What is the whole syntax for Workbooks.Open()? Thanks.
 
It keeps telling me when I put the line of code the way that you say is that the file already exists when it is trying to save it.
 
This is what I ended up doing.
Set oWrkBook = oExcel.Workbooks.Open (FileLoc, 3, , , "purple" ,"purple",True)
Thanks for your help!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top