ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Open password workbook not working (https://www.excelbanter.com/excel-programming/392483-open-password-workbook-not-working.html)

Aaron

Open password workbook not working
 
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?


Tom Ogilvy

Open password workbook not working
 
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.



--
Regards,
Tom Ogilvy


"Aaron" wrote:

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?


Gary Keramidas

Open password workbook not working
 
try this

Workbooks.Open Filename:="I:\Aging\Month End\CMT Monthly Aging 07.xls", _
Password:="atervse", WriteResPassword:="atervse"

--


Gary


"Aaron" wrote in message
...
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?




Rick S.

Open password workbook not working
 
Perfect!
Can we get a brief explanation why this works when passiing both password
arguments at the same time?

:beer:

"Gary Keramidas" wrote:

try this

Workbooks.Open Filename:="I:\Aging\Month End\CMT Monthly Aging 07.xls", _
Password:="atervse", WriteResPassword:="atervse"

--


Gary


"Aaron" wrote in message
...
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?






All times are GMT +1. The time now is 07:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com