I'm trying to get the sorted list of 10 numbers to show up in txtSorted, but it's not happening. What am I doing wrong?
Code:Private Sub cmdSort_Click() For pos = 1 To 9 min = intArray(pos) minInd = pos For index = pos + 1 To 8 If intArray(index) < min Then min = intArray(index) minInd = index End If Next index temp = intArray(pos) intArray(pos) = intArray(index) intArray(index) = temp txtSorted.Text = intArray(pos) & " " & txtSorted.Text Next pos txtSorted.Text = intArray(10) & " " & txtSorted.Text End Sub




Reply With Quote