Open password workbook not working

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using this code
Workbooks.Open Filename:="I:\Aging\Month End\CMT Monthly Aging 07.xls",
Password:="atervse"

But I am still prompted for the password. I want the file to open with
write rights without being prompted. Where am I going wrong?
 
Are you providing the correct password?

Also note that there are two types of password arguments:

Password Optional Variant. A string that contains the password required to
open a protected workbook. If this argument is omitted and the workbook
requires a password, the user is prompted for the password.

WriteResPassword Optional Variant. A string that contains the password
required to write to a write-reserved workbook. If this argument is omitted
and the workbook requires a password, the user will be prompted for the
password.
 
try this

Workbooks.Open Filename:="I:\Aging\Month End\CMT Monthly Aging 07.xls", _
Password:="atervse", WriteResPassword:="atervse"
 
Perfect!
Can we get a brief explanation why this works when passiing both password
arguments at the same time?

:beer:
 
Back
Top