How can I enter a workbook password automatically

G

Guest

Hi
I have a set of 6 user workbooks each of which is uniquely passworded (one
worksheet in each).
I then have a "master" workbook, which is also uniquely passworded, that
links to each of the 6 user workbooks to gather the worksheet information
into one place.

When the master is opened, Excel asks for the master password (which is
fine) but it also then asks for each of the 6 user workbook passwords.
Can I code the 6 usere workbook passwords into the master to save entering
them everytime? Perhaps by macro or something?
 
G

Guest

The prompt happens before any macros run, so I would see no way to do what
you want.
 
G

Guest

There is presumably some code in the workbook_open event that is opening
these secondary workbooks. You can add the password using something like:-

Set mybook = Workbooks.Open(Filename:=MyPath & MyFiles(Fnum), _
Password:="MyPassword")

If you post the code then it would make things easier.

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top