Private Sub Worksheet_Change(ByVal Target As Range)
On Error GoTo errHandler
Application.EnableEvents = False
If Target.Column = 12 And Target.Count = 1 Then
Call UnProtect
If Target.Value <> "" Then Rows(Target.Row).Locked = True
Call Protect
Else
End If
finished:
Application.EnableEvents = True
Exit Sub
errHandler:
MsgBox Err.Number & " - " & Err.Description
Resume finished
End Sub
|