PC Review


Reply
Thread Tools Rate Thread

Open Multiple Password Protected Workbooks with Macro

 
 
ScottMSP
Guest
Posts: n/a
 
      27th Mar 2008
Hello -

I have scoured the discussions boards, but have not found an answer to my
question and thus this post.

I have 10 workbooks that are each individually password protected with
unique passwords that I would like to be able to open all 10 at once using a
Macro.

I want to avoid having to individually click on and open each workbook and
key the unique password.

I plan for this to be part of a broader Macro doing other steps, but I have
not been able to find the solution to this part of the problem.

Thanks in advance.


 
Reply With Quote
 
 
 
 
Tom Hutchins
Guest
Posts: n/a
 
      27th Mar 2008
You can provide the password with the Workbooks.Open method, like this:

Workbooks.Open Filename:="D:\Data\Book1.xls", Password:="asd"
Workbooks.Open Filename:="D:\Data\Book2.xls", Password:="bnm"
Workbooks.Open Filename:="D:\Data\Book3.xls", Password:="cvb"
'etc.

Does that do what you want?

Hutch

"ScottMSP" wrote:

> Hello -
>
> I have scoured the discussions boards, but have not found an answer to my
> question and thus this post.
>
> I have 10 workbooks that are each individually password protected with
> unique passwords that I would like to be able to open all 10 at once using a
> Macro.
>
> I want to avoid having to individually click on and open each workbook and
> key the unique password.
>
> I plan for this to be part of a broader Macro doing other steps, but I have
> not been able to find the solution to this part of the problem.
>
> Thanks in advance.
>
>

 
Reply With Quote
 
 
 
 
ScottMSP
Guest
Posts: n/a
 
      1st Apr 2008
Yes... it almost seems too simple, but it definitely worked. I can use it as
a part of the larger macro. Thank you!

"Tom Hutchins" wrote:

> You can provide the password with the Workbooks.Open method, like this:
>
> Workbooks.Open Filename:="D:\Data\Book1.xls", Password:="asd"
> Workbooks.Open Filename:="D:\Data\Book2.xls", Password:="bnm"
> Workbooks.Open Filename:="D:\Data\Book3.xls", Password:="cvb"
> 'etc.
>
> Does that do what you want?
>
> Hutch
>
> "ScottMSP" wrote:
>
> > Hello -
> >
> > I have scoured the discussions boards, but have not found an answer to my
> > question and thus this post.
> >
> > I have 10 workbooks that are each individually password protected with
> > unique passwords that I would like to be able to open all 10 at once using a
> > Macro.
> >
> > I want to avoid having to individually click on and open each workbook and
> > key the unique password.
> >
> > I plan for this to be part of a broader Macro doing other steps, but I have
> > not been able to find the solution to this part of the problem.
> >
> > Thanks in advance.
> >
> >

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code to open multiple password protected workbooks =?Utf-8?B?c2hvcnRpY2FrZQ==?= Microsoft Excel Programming 0 11th Oct 2007 08:46 PM
Excel Macro to open password protected workbooks? =?Utf-8?B?REJN?= Microsoft Excel Misc 3 30th Mar 2007 04:48 PM
How to see macro code of a password protected macro without a password? Dmitry Kopnichev Microsoft Excel Discussion 5 27th Oct 2005 09:57 AM
How to see macro code of a password protected macro without a password? Dmitry Kopnichev Microsoft Excel Programming 5 27th Oct 2005 09:57 AM
macro to batch fix errors on password protected workbooks =?Utf-8?B?c3BlbmNl?= Microsoft Excel Programming 4 7th Oct 2005 04:06 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:52 AM.