The following values may be returned in the system variable FUNCTION_RETURN (the run-time error number appears in brackets, where applicable):
0 function executed successfully, value assigned
1 error in a function parameter, value set to empty
-1 invalid channel number passed to DLL (5051)
-2 invalid name of function (5051)
-3 I/O error occurred (5051)
-4 program exception occurred during DLL processing (4050)
-5 buffer overrun in function parameters (5052)
-10 expression error for Evaluate (5051)
-11 LookupExcel: failed to open Excel file
-12 LookupExcel: no sheets in Excel file
-13 LookupExcel: no rows on first sheet
-14 LookupExcel: invalid keycolumn syntax
-15 LookupExcel: header has fewer columns than keycolumn
-16 LookupExcel: invalid resultcolumn syntax
If a run-time error occurs, no assignment will be made to the variable and it will retain its original value, if any.
In addition to the above return values, the ConvertFile function may return GCSINGLE negative error codes. These codes are shown in { } brackets in the CopiaFacts engine error list along with their corresponding run-time error values.