D
Dennis D.
Hello:
I want a function to return three variables to the calling procedure:
Private Function CalcTimes(ByVal iAddDays as Integer, ByVal iAddHours as
Integer, ByVal iAddMins as Integer) As Array
Variable values are calculated in the function.
Calling procedure receives the values preferably into variables of the same
name.
Like: Me.CalcTimes(iAddDays, iAddHours, iAddMins)
Further use is ...(New TimeSpan(iAddDays, iAddHours, iAddMins, 0))
Could use ParamArray Arguments?
Is As Array correct or should it be As Integer?
Do I need to declare CalcTimes as an array before it is used, or is it an
array by definition?
This is somewhat confusing to me.
Balena's Prog-Vb ParamArray example begins:
Function Sum(ParamArray ByVal args() As Integer) As Integer
Dim index As Integer
For index = 0 to UBound(args)....
So far, I'm getting a debug error. I tried a return statement:
Return CalcTimes(iAddDays, iAddHours, iAddMins)
I'm not even sure about using a return statement here. It immediately
preceeds the End Function statement anyway.
Sorry about being lazy. 5:36AM is near end of the day for me.
Thanks.
D.
I want a function to return three variables to the calling procedure:
Private Function CalcTimes(ByVal iAddDays as Integer, ByVal iAddHours as
Integer, ByVal iAddMins as Integer) As Array
Variable values are calculated in the function.
Calling procedure receives the values preferably into variables of the same
name.
Like: Me.CalcTimes(iAddDays, iAddHours, iAddMins)
Further use is ...(New TimeSpan(iAddDays, iAddHours, iAddMins, 0))
Could use ParamArray Arguments?
Is As Array correct or should it be As Integer?
Do I need to declare CalcTimes as an array before it is used, or is it an
array by definition?
This is somewhat confusing to me.
Balena's Prog-Vb ParamArray example begins:
Function Sum(ParamArray ByVal args() As Integer) As Integer
Dim index As Integer
For index = 0 to UBound(args)....
So far, I'm getting a debug error. I tried a return statement:
Return CalcTimes(iAddDays, iAddHours, iAddMins)
I'm not even sure about using a return statement here. It immediately
preceeds the End Function statement anyway.
Sorry about being lazy. 5:36AM is near end of the day for me.
Thanks.
D.