There are several ways to do what you want:
1. You can declare a user data type consisting of several values, and return that from the function.
2. You can return a Variant that contains an array.
3. You can modify the values of several "ByVal" arguments (this is called a "side effect" of the function; programmers will curse you unless you document it well)
4. You can modify the values of several global variables (another side effect)
What you can't do is return several values and use them in an expression that contains the function call. Mathematical formulas can't contain terms with multiple values, and programming language expressions are based on math. What, after all, would "a + Func(b)" mean if Func(b) returned multiple values? Which value would be added to 'a' in evaluating the expression? It's a totally foreign concept. Rick Sprague
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.