wilg
06-26-2011, 07:42 AM
I have the following code that I use to protect all sheets in my workbook.
Sub ProtectAll()
Dim Sh As Worksheet
Dim myPassword As String
myPassword = "password"
For Each Sh In ThisWorkbook.Worksheets
Sh.Protect Password:=myPassword
Next Sh
End Sub
Is there a way to modify so that select locked cells in unchecked or false in the protection options?
Sub ProtectAll()
Dim Sh As Worksheet
Dim myPassword As String
myPassword = "password"
For Each Sh In ThisWorkbook.Worksheets
Sh.Protect Password:=myPassword
Next Sh
End Sub
Is there a way to modify so that select locked cells in unchecked or false in the protection options?