TempUBound = UBound(vArray)
TempLBound = LBound(vArray)
starttime = Timer
Do
bSorted = True
For j = TempLBound To TempUBound - 1
If vArray(j) > vArray(j + 1) Then
TestElemFirst = vArray(j)
TestElemNext = vArray(j + 1) 'getting a "null value" in array why?
vArray(j) = TestElemNext
vArray(j + 1) = TestElemFirst
bSorted = False
End If
Next j
Loop While bSorted = False
Form1.Text1.Text = Timer - starttime
SortArray = vArray
any ideas why the result array has a null in it?


Reply With Quote
