Error Handling

  • Thread starter Thread starter Edgar
  • Start date Start date
E

Edgar

Hi

Can anyone recommend a couple of good websites for Error
HAndling scripts?

TIA
 
Edgar

I don't know of any websites that cover that. Here's the structure that I
use

Sub SubName()

'Error checking for whole sub
On Error GoTo Err_SubName


'Check for a specific error

On Error Resume Next
'try something that may be an error

If Err.Number = 13 Then
'
Err.Clear
End If

On Error GoTo Err_SubName

Exit_SubName:
'Clean up stuff
Exit Sub

Err_SubName:
MsgBox Err.Description
Resume Exit_SubName

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top