Read Only File

A

Alan

Hi,
I want to open an XL file which is saved as read only as part of a macro,
(all above board, its my file). I know the code to open it but it still
gives the promt for the password. This is on a networked system, the file in
question is on a public drive.
Workbooks.Open Filename:="\\P:\Statistics$\Files\DA\BB29.xls"
Is there a way to incorporate the password within the code so it just opens
the file in the same way as unprotecting a worksheet like
Sheet2.Unprotect ("Password")
Something like
Workbooks.Open Filename:="\\P:\Statistics$\Files\DA\BB29.xls", Password:=
("Password")
That doesnt work, I've tried it!
Thanks for any advice,
Regards,
Alan.
 
A

Alan

Sorry those two lines have turned into hyperlinks, I don't know why that
happened, it wasn't like that when I sent it, please ignore them,
Regards,
Alan.
 
A

Alan

Sorry but I can't get that to work, its the same as in my post isn't it, or
am I missing something?
Regards,
Alan.
 
T

Tim Williams

Not *exactly* the same, which is why I posted it.
It's always worked for me.

Excel version etc?

Tim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top