Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook - Using Forms (http://www.outlookbanter.com/outlook-using-forms/)
-   -   Supressing Debug (http://www.outlookbanter.com/outlook-using-forms/5679-supressing-debug.html)

R Fourt March 1st 06 05:05 PM

Supressing Debug
 
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

Hollis D. Paul March 1st 06 05:18 PM

Supressing Debug
 
In article ,
=?Utf-8?B?UiBGb3VydA==?= wrote:
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




Sue Mosher [MVP-Outlook] March 1st 06 08:20 PM

Supressing Debug
 
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
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"Hollis D. Paul" wrote in message ...
In article ,
=?Utf-8?B?UiBGb3VydA==?= wrote:
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




robert March 1st 06 09:35 PM

Supressing Debug
 
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 [MVP-Outlook]" wrote:

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
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"Hollis D. Paul" wrote in message ...
In article ,
=?Utf-8?B?UiBGb3VydA==?= wrote:
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





Hollis D. Paul March 2nd 06 05:18 AM

Supressing Debug
 
In article , Sue Mosher
[MVP-Outlook] wrote:
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





All times are GMT +1. The time now is 08:39 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com