Hi, Jack,
Thought it'll be more user friendly for users to manually lock the entry only when they've really finished entering the data.
Sorry but to rely on extra action isn´t what I would call user-friendly.
Sub LockSheet()
Dim lngCtr As Long
Const cstrPW As String = "password"
For lngCtr = 2 To 11
If WorksheetFunction.CountBlank(Range("B" & lngCtr & ":D" & lngCtr)) = 0 Then
ActiveSheet.Unprotect cstrPW
Range("B" & lngCtr & ":D" & lngCtr).Locked = True
Else
Range("B" & lngCtr & ":D" & lngCtr).Locked = False
End If
Next lngCtr
ActiveSheet.Protect cstrPW
End Sub
Ciao,
Holger
Bookmarks