Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm trying to return a custom error to Excel from my UDF. The calling
cell always displays #Value! when an error occurs. The Error.Type is 3, corresponding to #Value!. Why don't I get my custom error number back? Dave Public Function Foo(intTest as Integer) As Variant Dim lngFuncReturn As Long On Error GoTo Foo_Error '...Get the description lngFuncReturn = MyFoo(intTest) If (lngFuncReturn < STATUS_SUCCESS) Then '...Return a custom error number Foo = CVErr(lngFuncReturn) Else '...Make the function value the returned value: Foo = lngFuncReturn End If Foo_Resume: Exit Function Foo_Error: Foo = CVErr(xlErrNA) Resume Foo_Resume End Function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
vlookup returning Errors (ISNA formula) | Excel Worksheet Functions | |||
Help on sumproduct returning errors | Excel Worksheet Functions | |||
VLOOKUP returning errors | Excel Worksheet Functions | |||
xlodbc returning no rows & no errors | Excel Programming | |||
Formulas returning errors when reference columns are deleted | Excel Programming |