I'm getting the run-time error "Method '_Default' of object 'Range' failed" when using the following macro in my excel document.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Target.Row < 2 Then Exit Sub
Cells(Target.Row, "H") = Date
End Sub
It only happens sometimes, but when it does I cannot debug as it freezes and closes excel before reopening.
I am trying to update the date in column H when a row is edited. I found this code online and modified it to fit my situation.