run time error notification -- want to disable (1 Viewer)

toddbingham

Registered User.
Local time
Yesterday, 21:38
Joined
Jul 8, 2003
Messages
93
Getting confirmation of a null entry. I want that notification to be turned off. This macro pulls some data and prints to a report. I want the null entry to show, but I dont want to have to click end everytime.

Thanks.
 

Mile-O

Back once again...
Local time
Today, 02:38
Joined
Dec 10, 2002
Messages
11,316
Macros don't allow for error trapping/handling.

Convert your macro to Visual Basic code and it will automatically insert the extra lines such as:

Code:
[b]On Error Goto [i]macroname[/i][/b]

You can change this line to:

Code:
On Error Goto 0

which, effectively, turns off the error handler off in code.
 

jeremie_ingram

Registered User.
Local time
Yesterday, 20:38
Joined
Jan 30, 2003
Messages
437
For saftey measures, you may want to edit the

MsgBox Error$

to

MsgBox Error.Num

This will cause the message box that appears to only show the erro number. Then in the code add an if statement to bypass just that particular error.

Macro1_Err:
If error.num = 1234 (number given in the message box) then
Resume Macro1_Exit
Else
MsgBox Error$
Resume Macro1_Exit

End Function

I think that should do it, and it will only by-pass the particual error you are trying to prevent. All other errors will still be brought to your attention.
 

Users who are viewing this thread

Top Bottom