UDF Error Handling is ignored. Not for everyone?
- From: StevensSpam@xxxxxxxxxx
- Date: 22 Mar 2006 08:41:09 -0800
I have created a new function to try to recreate an example function
that mimics my intent:
Public Function HelloWorld(causeError As Boolean) As String
On Error GoTo ErrorHandler
If (causeError) Then
Err.Raise 1234
Else
HelloWorld = "Hello World"
End If
FunctionExit:
Exit Function
ErrorHandler:
Err.Clear
HelloWorld = "ERROR HAPPENED"
Resume FunctionExit
End Function
For me;
=HelloWorld(FALSE) returns "Hello World"
=HelloWorld(TRUE) returns #VALUE!
For someone else, they get;
=HelloWorld(FALSE) returns "Hello World"
=HelloWorld(TRUE) returns "ERROR HAPPENED"
What could be the problem? I am using Excel 2003, SP2
.
- Follow-Ups:
- Re: UDF Error Handling is ignored. Not for everyone?
- From: Dave Peterson
- Re: UDF Error Handling is ignored. Not for everyone?
- From: Niek Otten
- Re: UDF Error Handling is ignored. Not for everyone?
- Prev by Date: Re: Pivot table causing buffer overflow
- Next by Date: combobox problem
- Previous by thread: combobox problem
- Next by thread: Re: UDF Error Handling is ignored. Not for everyone?
- Index(es):
Relevant Pages
|