I have put the following code in my vbscript to catch errors, but it does
absolutely nothing. This is straight out of the book.... did I miss
something here?
Thanks
Dim strMessage
If Err.Number <> 0 Then
MsgBox "Well, That didn't Work"
strMessage = "The following error " & Err.Description & _
" has occurred in the " & Err.Source & " appliction. " & _
"The error number was " & Err.Number & ". " & _
"Please report this error to the help desk."
MsgBox strMessage,16,"Run-time Error #" & Err.Number
Exit Sub
End If
Eric Legault [MVP - Outlook] - 26 Apr 2005 02:26 GMT
Can you please provide some context? Your code is fine, except that if there
is no error, code after the "If Err.Number <> 0 Then" line won't run. So if
there are no errors, everything is fine!
--
Eric Legault - B.A, MCP, MCSD, Outlook MVP
--------------------------------------------------
{Private e-mails ignored}
Job: http://www.imaginets.com
Blog: http://blogs.officezealot.com/legault/
> I have put the following code in my vbscript to catch errors, but it does
> absolutely nothing. This is straight out of the book.... did I miss
[quoted text clipped - 14 lines]
> Exit Sub
> End If