I managed to find this below code
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("d" & Selection.Row).Value <> Date Then
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
MsgBox ("Only edit today's row please.")
ElseIf Range("d" & Selection.Row).Value = Date Then
ActiveSheet.Unprotect
ActiveSheet.EnableSelection = xlNoRestrictions
End If
End Sub
but it locks the sheet on click or selection change. I want it to lock rows that don't have todays date and allow user to work rows that have todays. right now its locking everything.
Thanks for any help.
Bookmarks