How to return a result from a VBA function

Posted by Editorial Staff | Updated on

In this example, We haves shared 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:


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers