Couple of routines from an old post of JE.McGimpsey's
First one will give a list of the sheets and their protection status.
Public Sub ToggleProtect1()
Const PWORD As String = "ken"
Dim wkSht As Worksheet
Dim statStr As String
For Each wkSht In ActiveWorkbook.Worksheets
With wkSht
statStr = statStr & vbNewLine & "Sheet " & .Name
If .ProtectContents Then
wkSht.Unprotect Password:=PWORD
statStr = statStr & ": Unprotected"
Else
wkSht.Protect Password:=PWORD
statStr = statStr & ": Protected"
End If
End With
Next wkSht
MsgBox Mid(statStr, 2)
End Sub
--------------------------------------------------
Sub Toggleprotect2()
Const PWORD As String = "ken"
Dim wkSht As Worksheet
For Each sh In ActiveWorkbook.Worksheets
If sh.ProtectContents = False Then
sh.Protect PWORD
Else
sh.Unprotect PWORD
End If
Next sh
End Sub