Protecting/unprotecting multiple sheets at a time

  • Thread starter Thread starter Hall
  • Start date Start date
H

Hall

I can protect locked cells in a sheet using Tools->Protection->Protect
Sheet. But I seem to have to do that for each sheet of my workbook,
entering the password twice and specifying what I want to allow each time!

Is there a way to specify a protection of all sheets at one time? What
about to unprotect?

The menu function Protect Workbook doesn't seem to protect the locked cells
the way Protect Sheet does.

Thanks!
 
Hall,

The only thing I know of to protect multiple workbooks is via a macro. Same
for unprotect.

The Protect Workbook isn't intended to protect the innards of a sheet
(locked cells). It's to keep sheets from being deleted, moved, added, etc.
A different area of protection.
 
Hall

Not possible without using VBA.

Couple of Macros you can use.

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

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 Excel MVP
 
Back
Top