I have three columns in an excel sheet.
A B C
Date Logged HRID Name
This excel sheet has a timestamping VB code applied. (see below) How do I customize it in a way that details under column A will not be deleted manually? I tried password protect but I seem to get VB Code debug issues whenever I activate it.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
Select Case Target.Column
Case 2 To 3
If Not IsDate(Cells(Target.Row, "a").Value) Then
Application.EnableEvents = False
Cells(Target.Row, "a").Value = Now()
End If
If IsEmpty(Target) Then Target.Offset(0, -1).ClearContents
End Select
Application.EnableEvents = True
End Sub
Thank you.
Bookmarks