Returns control to the code that called a Sub or Function procedure.
Syntax
Return expression
or
Return
Comments
For a Sub procedure or a Property procedure that sets the property's value, the Return statement is equivalent to an Exit Sub statement, and expression must not be supplied. For a Function procedure or a Property procedure that retrieves the property's value, expression must be present and must evaluate to a data type that is convertible to the return type of the function. In this form, Return is equivalent to assigning the expression to the function name as the return value and then executing an Exit Function statement.