Open password protected workbook.

T

Tom

Hello,

I set password for open workbook (only for write). Now I'm trying open this
workbook with macro run in another workbook. I thought its possible like
this:

Workbooks.Open Filename:="C:\tom.xls", Password:=tom

but it dosnt work. Can you help me?

Thanks in advance for your help

TOM
 
A

AA2e72E

There is a Password parameter and a WriteResPassword parameter. Should not the password string be within double quotes?
 
T

Tom

Thanks this is good:

Workbooks.Open Filename:="C:\tom.xls", WriteResPassword :="tom"

TOM

AA2e72E said:
There is a Password parameter and a WriteResPassword parameter. Should
not the password string be within double quotes?
 
P

pcc

If you only need data from a protected workbook, I have
used this:
Workbooks.Open Filename:="C:\tom.xls", ReadOnly:=True
 
Top