Supressing Debug

R

R Fourt

Is there a way, using VB Script, to supress the debugger from coming up when
an error occurs in a script?
And is it true that there is no error handler in VB Script?

Thanks,
Robert
 
H

Hollis D. Paul

And is it true that there is no error handler in VB Script?
You have to code your own error handler. Most just put in On Error, do
next.

Hollis D. Paul [MVP - Outlook]
Mukilteo, WA USA
 
S

Sue Mosher [MVP-Outlook]

I think you mean On Error Resume Next, Hollis.

Robert, once you add On Error Resume Next, you can also add checkpoints where you think the code might encounter an error and test for the error condition:

If Err <> 0 Then
' there is an error
' do something about it
' then clear it
Err.Clear
End If

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Hollis D. Paul said:
And is it true that there is no error handler in VB Script?
You have to code your own error handler. Most just put in On Error, do
next.

Hollis D. Paul [MVP - Outlook]
Mukilteo, WA USA
 
R

Robert

Thanks Sue,

I had already stumbled my way through that. Pretty cludgy though, of course
my code has no places where an error might occur....ahem!

Sue Mosher said:
I think you mean On Error Resume Next, Hollis.

Robert, once you add On Error Resume Next, you can also add checkpoints where you think the code might encounter an error and test for the error condition:

If Err <> 0 Then
' there is an error
' do something about it
' then clear it
Err.Clear
End If

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Hollis D. Paul said:
And is it true that there is no error handler in VB Script?
You have to code your own error handler. Most just put in On Error, do
next.

Hollis D. Paul [MVP - Outlook]
Mukilteo, WA USA
 
H

Hollis D. Paul

Sue Mosher said:
I think you mean On Error Resume Next, Hollis.
Yes, indeed I did. I was groping for the right words, but they
wouldn't appear at my fingertips. But I figured any VB programmer
could figure it out. Thanks for filling in the senior moment lapse.

Hollis D. Paul [MVP - Outlook]
Mukilteo, WA USA
 

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

Top