我已将分数添加到一起,现在需要在msgbox中从第1位到最后位置对它进行排序我该怎么做。
Dim total As Decimal
If File.Exists("totals.txt") Then
File.Delete("totals.txt")
End If
For intCount = 0 To (numGymnasts - 1)
total = Val(strScores(intCount, 3)) + Val(strScores(intCount, 4)) + Val(strScores(intCount, 5)) + Val(strScores(intCount, 6)) + Val(strScores(intCount, 7)) + Val(strScores(intCount, 8)) + Val(strScores(intCount, 9)) + Val(strScores(intCount, 10)) + Val(strScores(intCount, 11)) + Val(strScores(intCount, 12)) + Val(strScores(intCount, 13)) + Val(strScores(intCount, 14)) + Val(strScores(intCount, 15)) + strScores(intCount, 16) + Val(strScores(intCount, 17)) + Val(strScores(intCount, 18))
Dim Append As StreamWriter = File.AppendText("totals.txt")
Append.WriteLine(strScores(intCount, 1) & "," & total)
Append.Close()