Please help I have 2 sheets out of 10 that keep protecting. I want them unprotected completely and never protected. My code is as follows NB: the two sheets are Recon 2103 & Recon 2123:
Private Sub quickProt()
For Each Sheet In ActiveWorkbook.Worksheets
If Sheet.Name = "Master" Or Sheet.Name = "GL" Or Left(Sheet.Name, 2) = "BE" Or Sheet.Name = "Log" Or Sheet.Name = "ZAA110" Or Sheet.Name = "Recon 2103" Or Sheet.Name = "Recon 2123" Then
Sheet.Unprotect ("SSDPWD@123")
'Sheet.Protect ("SSDPWD@123")
Else
Sheet.Protect ("SSDPWD@123")
End If
Next Sheet
End Sub
As shown above, I added the two sheets on the list to unprotect.
New contributor
Jabulani Nene is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1