Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default Password protected

Good day.

I have a Excel file that links back to several other files. However, some
of the other files are password protected. If I know the passwords, it is
possible to pass those password using VBA and open my linked workbook without
being prompted for a password?

Each time I open the linked file I am asked for the passwords to the other
files, but the users don't want that. They do want their files protected,
however.

Any ideas?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 694
Default Password protected

Hi Steve,
Look in the online help for the Open method of the Workbooks collection, you
can use the following parameters:
"
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.
"

so
Workbooks.Open Filename:="C:\mybook.xls", password:="mypass" ,...
--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"Steve" wrote:

Good day.

I have a Excel file that links back to several other files. However, some
of the other files are password protected. If I know the passwords, it is
possible to pass those password using VBA and open my linked workbook without
being prompted for a password?

Each time I open the linked file I am asked for the passwords to the other
files, but the users don't want that. They do want their files protected,
however.

Any ideas?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default Password protected

Sorry, let me rephrase the question. I don't want to open the linked files,
I just don't want to see the password dialog come up for each file that is
linked to this workbook. In other words, for each file that is linked to the
main file, if the file is closed, I have to type the password just to get the
files to link. I just want them to link without typing the password for each
file. I know the passwords for each file and I want to use them in VBA to
link the protected files, but not open them.

Make sense?

"sebastienm" wrote:

Hi Steve,
Look in the online help for the Open method of the Workbooks collection, you
can use the following parameters:
"
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.
"

so
Workbooks.Open Filename:="C:\mybook.xls", password:="mypass" ,...
--
Regards,
Sébastien
<http://www.ondemandanalysis.com


"Steve" wrote:

Good day.

I have a Excel file that links back to several other files. However, some
of the other files are password protected. If I know the passwords, it is
possible to pass those password using VBA and open my linked workbook without
being prompted for a password?

Each time I open the linked file I am asked for the passwords to the other
files, but the users don't want that. They do want their files protected,
however.

Any ideas?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to retrive password protected worksheet but forgot password? Laurie Excel Worksheet Functions 1 November 19th 09 09:42 PM
how to automate opening a password protected excel file? e.g. a .xls that has a password set in the security tab. Daniel Excel Worksheet Functions 0 June 23rd 05 11:56 PM
bypass password when update linking of password protected file Yan Excel Discussion (Misc queries) 1 February 7th 05 11:29 PM
Password protected Frank Kabel Excel Programming 0 August 12th 04 12:22 AM
VBa, Password protected sheet fails to get unprotected with the same password Hans Rattink Excel Programming 3 July 28th 03 02:30 PM


All times are GMT +1. The time now is 02:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"