VBA Return Values


Example

To retrieve the result of a procedure call (e.g. Function or Property Get procedures), put the call on the right-hand side of an assignment:

result = ProcedureName
result = ProcedureName(argument1, argument2)

Parentheses must be present if there are parameters. If the procedure has no parameters, the parentheses are redundant.