Hello all,
In attached file i use the following vba code to lock / unlock rows;
When data is entered in column "J" the row locks. When i remove the data in column J the row unlocks.
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Columns("A:I")) Is Nothing And Target.CountLarge > 0 Then
If Len(Cells(Target.Row, "J").Value) Then
MsgBox "When you closed the row with your initials you cannot change values in columns A : I." & _
vbLf & vbLf & "Remove your initials if you are sure you want to change data.", vbExclamation
Application.EnableEvents = False
Application.Undo
Application.EnableEvents = True
End If
End If
End Sub
It works perfect except for 1 thing;
When i remove the sign to unlock the row i'm unable to delete the row.
See example;
Row 3 is not locked anymore but i can't delete the row. The code fires and the data returns.
Someone knows what's wrong?
Bookmarks