Dumb question regarding returning multiple values from a function
HiHiHi,
When I pass multiple values to a function, then return values to the calling function, sub or module, are all of the values that I passed to the function returned?
If not, what are some recommended methods of returning multiple values from a function.
thanx
V.
Re: Dumb question regarding returning multiple values from a function
Look for documentation of Byref & Byval. Byref with modify values (if changed in function) when function returns. Byval makes copy of variables passed so changes are not reflected in calling fuction
Re: Dumb question regarding returning multiple values from a function
maybe u can try the following. i am assuming you are using VB5.0
use the equivalent of the structure. i.e the Type data type in VB
in the .BAS module declare the Type...End Type block with its member variables
then declare a public method to set the variables,
and then access that public variable through your form file or wherever else.
since the Type declaration is global it can be used from everywhere..
the help on Type statement gives an example as well.
good luck
- suyog