Reputation: 11
I have a userform that opens several files and processes them. But I just realized the program doesn't stop or output any runtime errors when there is one. For example,
Dim wb as workbook
Dim ws as worksheet
set ws = wb.sheets("Random")
Even if there's no sheet in the workbook named "Random", the above code won't stop and tell me there's a runtime error. How can I fix it?
Thanks!
Upvotes: 1
Views: 41
Reputation: 2260
Try adding On Error GoTo 0
.
It will turn error displaying back on.
Upvotes: 0