I'm learning VBA trying in my live Excel sheets.
I have VBA code, 1st got
Runtime Error 13 type mismatch
while deleting multiple cells, with small work I'm not getting the error while deleting multiple cells, but when I do UNDO to the multi deleted cells, the same error occurs.
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Column = 6 Then
ThisRow = Target.Row
If Target.Cells(1).Value = vbNullString Then Exit Sub
If Len(Target.Offset(, -4)) = 0 Then
Range("J" & ThisRow).Value = Time()
Range("B" & ThisRow).Value = Date
Range("AA" & ThisRow).Value = Environ("username")
End If
End If
End Sub