E Edgar Mar 23, 2004 #1 Hi Can anyone recommend a couple of good websites for Error HAndling scripts? TIA
D Dick Kusleika Mar 24, 2004 #2 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
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