I'm trying to create a macro that puts the date in a cell on another worksheet, when the initial worksheet is changed, but it gives me an out of range error. Is there any way to get around this, or am I simply unable to use the Worksheet_Change for this case. If so, what can I use? I was simply trying to test it, so I only have this so far:
Private Sub Worksheet_Change(ByVal Target As Range) Application.EnableEvents = False Worksheets("Sheet4").Activate Range("E1").End(xlDown).Offset(1, 0).Value = Date Application.EnableEvents = True End Sub I now have this:
Private Sub Worksheet_Change(ByVal Target As Range) Application.EnableEvents = False If Worksheets("Testing Sheet").Range("E2").Value = "" Then Worksheets("Testing Sheet").Range("E2").Value = Date Else ' Worksheets("Testing Sheet").Range("E2").End(xlDown).Offset(1, 0).Value = Date End If Application.EnableEvents = True End Sub But the statement at the Else is giving me an error saying Application defined or object defined error. (side note I don't have it commented out in my actual code)