How to return a result from a VBA function
For non-object return types, you have to assign the value to the name of your function, like this: Example usage: If the function returns an Object type, then you must use the Set keyword like this: Example usage: Note that assigning a return value to the function name does not terminate the execution of your function. If … Read more