How do I return multiple values?
I tried making a function that took 4 varibles ByRef in hopes that function could change them and when the function ended the new values would be back in the caller function. Like a reference should, right?
Is there anyway to get this done?
Thanks,
NOMAD
Maritn hasn't got any return datatype after the following
Public Function DoIt(intA As Integer, intB As Integer, intC As Integer, intD As Integer) ?????
intA = intA * 2
intB = intB * 3
intC = intC * 4
intD = intD * 5
End Function
Quote:
Originally posted by khalik_ash
function being public does not return any thing... its the scope.
Code:
Public Function DoIt(intA As Integer, intB As Integer, intC As Integer, intD As Integer) as integer
intA = intA * 2
intB = intB * 3
intC = intC * 4
intD = intD * 5
' DoIt= some thing the return value
End Function
scope is public yes , but the function has no return???????
Public Function DoIt, how do the values inside the function get bacl to the calling sub????
i thought you had to use
VB Code:
something = DoIt(intOne, intTwo, intThree, intFour)????
'run some code to split up the return of doit (i.e something)
'then make msgbox = to the bits of something>???
MsgBox intOne & " " & intTwo & " " & intThree & " " & intFour
please explain this i am confused here
???
:wave::confused: :confused: :confused: