I have made a macro for my spreadsheet that is supposed to conditional lock cells aft date is entered. I've tried running the macro but I get a debug notice at this lie cl.Locked = "True"
This is the full macro: I am hoping someone can help me resolve the issue
Private Sub Worksheet_Change(ByVal Target As Range)
Dim cl As Range
ActiveSheet.Protect Password:="123"
For Each cl In Target
If cl.Value <> "" Then
check = MsgBox("Is this entry correct? This cell cannot be edited after entering a value.", vbYesNo, "Cell Lock Notification")
If check = vbYes Then
cl.Locked = "True"
Else
cl.Value = ""
End If
End If
Next cl
Activeshet.Protect Password:="123"
Bookmarks