Illegal function return type for: <function name>
You either used a Declare or Function statement to declare or define a function and specified its return type as a fixed-length string or a user-defined data type, or else you used a Declare statement to declare an external C function and specified its return type as Variant, Currency, fixed-length String, or a user-defined data type.
Specify a data type other than the ones listed previously for the function's return value.