unlock

How to access a password protected file with VBA in Excel

0:00
↔️ ↕️

Timecodes:

I was asked the other day on how to access with VBA a file that has a

password password protection on it so first of all I want to show you now you

can put password protection on on your your sheets so that you can't change

them or can't add any data but the most secure way to do it is is have it

encrypted so that nobody can read it unless they have the password so for

example I'm going to open my the file that has it's called password file

that's now before it opens it requires that I enter a password so i have

entered padPWD test and then I say ok and there you just have my basic file

here so let's close that down now if I open a file that I would like to I would

like to access that file so let's go to the developer and let's

go through the code so I'm basically copying from it's called the subskills

from password and this it's a source is a workbook and I'm setting the source

equals workbooks open and once again I'm using the the address from the address

bar true true means we're using it as read-only we're just we're not opening

in us we're just getting the information and then included in this line I have my

password test so that it allows me to get into the file that is password

protected and in this case it's encrypted and then I'm saying this book

this workbook activates so it copies onto my blank sheet here as opposed to

copying back into the password protected sheet and

I'm going on this worksheet range B 2 to D 3 4 . formula equals source take it

from the source sheet that is password-protected sheet 1


Related queries:


how to break excel password protected workbook
how to unlock excel password protected file
how to remove excel password from workbook
how to open excel password protected file online free
how to unlock password protected excel workbook
how to unprotect password protected excel workbook