PDA

View Full Version : Solved: Getting Data from Password Protected Workbook



Kicker
03-14-2007, 08:49 PM
should be relatively simple but I seem to be mising something.

I have a workbook with a specific worksheet used as a database. it needs to be in a "common" subdirectory for a group of people to access. However, only a small number of people have full access to it for various reasons. For example, one column is for Social Security Number and only a handfull of people can read it.

I have several different workbooks that "reach into" the original and take specific ranges of data. for example, a workbook may need the data from Columns A, B, D, E, and J. A command button opens the file and copies the data perfectly. However, when I use a password, I can't get into the file without typing the password.

Is there a password parameter or method that can be used? such as .openfile password:="something"

Thanks for your help.

moa
03-15-2007, 03:44 AM
Workbooks.Open FileName:="theFileName", Password:="password"

moa
03-15-2007, 03:47 AM
or check out the unprotect and protect methods.

Kicker
03-15-2007, 07:59 AM
Thank you MOA. I knew I was close. Just didn't know I was "Stupid" close. It works just the way I need it to work.