Password Protect / Unprotect Multiple Workbooks?

manny77

New Member
Joined
Jun 27, 2011
Messages
13
Hi there,

My first time posting so apologies if I don't have the format down pat yet.

I have about 50 workbooks, each with a unique password that I know.

Once a month I have to update a few fields in each, which means I have to open the file, enter the password, make the changes, save and close.

Is there a way I could automate the process of unprotecting the files at the start? For example, could I do something to remove the protection for the given files, and then at a later point add protection back to all files?

I use Excel 2007

Thanks in advance,
Manny
 
Hi there,

I'm not having any luck- am I wrong to think that the code won't run until the workbook is open, and to open the workbook you need the password?

Anyway- it still asks for password to open file.

Manny

Did you edit your correct detail into the code?

The code I provided as an example does work, but is written to use the password "your password" to unlock "sheet1" when "manny1" or "anna" is logged in as the windows user.

To actively use the code on your own workbook(s) you would need to edit those parts of the code so that they are correct to the workbook on which the code is being used.
 
Upvote 0

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop

Forum statistics

Threads
1,224,618
Messages
6,179,916
Members
452,949
Latest member
beartooth91

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top