where is a function's return type specified
Return type You declare a method's return type in its method declaration. Within the body of the method, you use the return statement to return the value.
Variant type In Visual Basic (and Visual Basic for Applications) the Variant data type is a tagged union that can be used to represent any other data type (for example, integer, floating-point, single- and double-precision, object, etc.) except fixed-length string type and record types. In Visual Basic, any variable not declared explicitly or the type of which is not declared explicitly, is taken to be a variant.