I have two worksheets, which are Sheet1 and Edit Log. I like to go from Sheet1 to Edit Log and enter some information in the last row in Edit Log. But, I am getting Object variable or with block variable not set runtime error.

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)

    ' Other code here to be executed in Sheet1

    Dim LastRow As Range
    Sheets("Edit Log").Activate
    Set LastRow = Sheets("Edit Log").Cell(Rows.Count, "A").End(xlUp).Row
    Sheets("Edit Log").Range("A" & LastRow + 1).Value = Format(Now, "dd/mmm/yyyy @ hh:mm:ss AM/PM")
    Sheets("LastSheet").Activate       'Takes me back to Sheet1 after the information is entered in Edit Log.
    
    End If
End Sub
Where am I doing wrong?