# function could return more ...

Posted by wei on September 03, 1999 at 22:39:45:

In Reply to: Re: call function ¡õ¡õreturn ¡õ¡õ¡õ¡õ¡õ¡õ posted by bmf on September 03, 1999 at 11:43:46:

dim FirstDay as Date
dim LastDay as Date

Private MyFunction(Byval InputDay as Date, ByRef FirstDay as Date, byRef LastDay as Date) as Boolean
'Calculate FirstDay and LastDay
'If succeed, return True, else return False
End Function

By passing variables by reference, a function could return as many values as you want.
Function(Byval Input, ByRef OutPut1, ..., ByRef OutPutN)

Follow Ups: