KP "No!" no my code runs fine!
Why are you changing the ReDim's to 2 for lower bound?
My code ran fine here is indy test of it to show the final values as correct:
Why are you changing the ReDim's to 2 for lower bound?
My code ran fine here is indy test of it to show the final values as correct:
Code: (Select All)
Dim Shared mySharedArray(1 To 20) As Long
For i = 1 To 20
mySharedArray(i) = i * i
Next
ReDim out10(1 To 10) As Integer
first10Plus5 = first10squaresPlus&(5, out10())
For i = 1 To 10
Print i ^ 2 + 5, out10(i)
tot2 = tot2 + i ^ 2 + 5
Next
Print "Total was: "; first10Plus5
Print "Tot2 check my sub total"; tot2
Function first10squaresPlus& (X, outputFirst10() As Integer)
For i = 1 To 10
outputFirst10(i) = mySharedArray(i) + X
tot& = tot& + outputFirst10(i)
Next
first10squaresPlus& = tot&
End Function
b = b + ...