C
Chris
Hello Group,
I have this code that i found in searching the forums, but i have a
question. I need to allow them to access two unlocked cells and a
pre-exsisting pivot table. I want to lock the rest of the sheet. Can someone
else me improve this code please?
Sub LockEm()
Dim i As Long
Dim PW As String
Dim WS As Worksheet
PW = InputBox("Password:")
On Error GoTo MyErr
For Each WS In ActiveWorkbook.Worksheets
WS.Protect (PW)
Next
MsgBox i & " errors while protecting", vbInformation
Exit Sub
MyErr:
i = i + 1
Resume Next
End Sub
Thank you.
I have this code that i found in searching the forums, but i have a
question. I need to allow them to access two unlocked cells and a
pre-exsisting pivot table. I want to lock the rest of the sheet. Can someone
else me improve this code please?
Sub LockEm()
Dim i As Long
Dim PW As String
Dim WS As Worksheet
PW = InputBox("Password:")
On Error GoTo MyErr
For Each WS In ActiveWorkbook.Worksheets
WS.Protect (PW)
Next
MsgBox i & " errors while protecting", vbInformation
Exit Sub
MyErr:
i = i + 1
Resume Next
End Sub
Thank you.