ThrottleWorks
Excel Ninja
Hi,
I am writing below function to handle expected errors.
However I do not know how to handle un-expected errors.
Can anyone please help me in this.
I am writing below function to handle expected errors.
However I do not know how to handle un-expected errors.
Can anyone please help me in this.
Code:
ErrorLog "ERROR", "Worksheet Chandoo not present " & Now
Code:
Sub ErrorLog(Status, Msg As String)
Set ts = fso.CreateTextFile(ThisWorkbook.Path & "/" & "ERROR.txt", True)
ts.WriteLine Status
ts.WriteLine ""
ts.WriteLine Msg
ts.Close
End Sub