I have a code that automatically timestamps on "A" when there's data on the next cells, and delete the date on "A" if I delete the entries, but sometimes I need to do correct previous dates and do manual entries, so I need to stop this code. I need a command button or macro to pause this code and when pressing again, run it again
Private Sub Worksheet_Change(ByVal Target As Range)
Const ColumnsToMonitor As String = "b:f"
Const DateColumn As String = "a"
Application.EnableEvents = False
If Not Intersect(Target, Columns(ColumnsToMonitor)) Is Nothing Then
With Intersect(Target.EntireRow, Columns(DateColumn))
.Value = Date
.NumberFormat = "ddd d/mm"
End With
End If
On Error Resume Next
If Target = "" Then
Intersect(Target.EntireRow, Columns(DateColumn)).ClearContents
End If
Application.EnableEvents = True
End Sub