ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How can I unprotect multiple same passoword worksheets at once? (https://www.excelbanter.com/excel-programming/409772-how-can-i-unprotect-multiple-same-passoword-worksheets-once.html)

tomster3

How can I unprotect multiple same passoword worksheets at once?
 
We have created a large number of workbooks containing worksheets that are
protected, except for a few cells, all with the same password. Is there any
way to remove protection from multiple worksheets at one time? We are trying
to avoid having to open each worksheet at a time, changing the one protected
text cell that needs changing, and then putting protection back on.

Per Jessen[_2_]

How can I unprotect multiple same passoword worksheets at once?
 
On Apr 22, 8:25*pm, tomster3
wrote:
We have created a large number of workbooks containing worksheets that are
protected, except for a few cells, all with the same password. *Is there any
way to remove protection from multiple worksheets at one time? *We are trying
to avoid having to open each worksheet at a time, changing the one protected
text cell that needs changing, and then putting protection back on.


Hi

With all workbooks open this macro will unprotect all sheets in all
worksheets.

Sub RemovePassword()
MyPassword = "PassWrd"

For Each wb In Application.Workbooks
For Each sh In wb.Sheets
sh.Unprotect Password:=MyPassword ' To protect sheets change
to "sh.Protect Password...."
Next
Next
End Sub

Regards,
Per


All times are GMT +1. The time now is 07:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com