Multiple Worksheet Protection

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a workbook that has multiple worksheets with the same format. Is
there a way to protect cells on these multiple worksheets at the same time.
The group feature does not work for this and having to do each worksheet
separately is very timeconsuming
 
Lee

Grouping sheets to select cells is not a problem, but the protecting of grouped
sheets must be VBA assisted.

Group the sheets to select the cells to be locked or unlocked on all sheets.

Ungroup when done.

Then run this macro to protect all sheets.

Sub ProtectAllSheets()
Application.ScreenUpdating = False
Dim n As Single
For n = 1 To Sheets.Count
Sheets(n).Protect Password:="justme"
Next n
Application.ScreenUpdating = True
End Sub

And to unprotect all sheets.

Sub UnprotectAllSheets()
Application.ScreenUpdating = False
Dim n As Single
For n = 1 To Sheets.Count
Sheets(n).Unprotect Password:="justme"
Next n
Application.ScreenUpdating = True
End Sub


Gord Dibben MS Excel MVP
 
Back
Top