Hi Guys,
I have this code for handling errors in my VBA code:
But the sheets "Export Journal" and "Fin (2)" aren't always in the workbook. It depends where the error is. When I handle the error like this, i'll get a error in my error handling. That can't be good
I was fiddling around with On error resume next, but i wasn't able to get it working. Can you guys help me out to handle the error correct?
Thanks!
I have this code for handling errors in my VBA code:
Code:
w00t:
Beep
MsgBox "Error in Task"
Worksheets("Input").Activate
Rows("1:" & Rows.Count).ClearContents
ThisWorkbook.Sheets("Export Journal").Delete
ThisWorkbook.Sheets("Fin (2)").Delete
Sheets("Fin").Visible = False
Sheets("Input").Visible = False
Application.ScreenUpdating = True
Application.DisplayAlerts = True
Worksheets("Converter").Activate
End Sub
But the sheets "Export Journal" and "Fin (2)" aren't always in the workbook. It depends where the error is. When I handle the error like this, i'll get a error in my error handling. That can't be good
I was fiddling around with On error resume next, but i wasn't able to get it working. Can you guys help me out to handle the error correct?
Thanks!