I am trying to return an array from a called function. I think this is something new in VB6 but I can't make it work.
Any help is appreciated.
I have tried the following code with no success:
Public Function EvaluateHrs(B As Integer, i As Integer) As Currency()
Dim EvaluateHrsItems(2) As Currency
'Calculations here.
EvaluateHrsItems(0) = Calc1
EvaluateHrsItems(1) = Calc2
EvaluateHrsItems(2) = Calc3
EvaluateHrs = EvaluateHrsItems
End Function
'Calling function from this Sub.
Public Sub CalcGross(B as integer, i As Integer)
Dim HrsItems() As Currency
HrsItems()=EvaluateHrs B, i 'This line won't work
If HrsItems(0) <> 0 Then
curOTPay = HrsItems(0)
End If
'etc.
End Sub
Thank You for any help.
TNN, Tom
TNPAYROLL@AOL.COM
TOM
Any help is appreciated.
I have tried the following code with no success:
Public Function EvaluateHrs(B As Integer, i As Integer) As Currency()
Dim EvaluateHrsItems(2) As Currency
'Calculations here.
EvaluateHrsItems(0) = Calc1
EvaluateHrsItems(1) = Calc2
EvaluateHrsItems(2) = Calc3
EvaluateHrs = EvaluateHrsItems
End Function
'Calling function from this Sub.
Public Sub CalcGross(B as integer, i As Integer)
Dim HrsItems() As Currency
HrsItems()=EvaluateHrs B, i 'This line won't work
If HrsItems(0) <> 0 Then
curOTPay = HrsItems(0)
End If
'etc.
End Sub
Thank You for any help.
TNN, Tom
TNPAYROLL@AOL.COM
TOM