VB Code:
'data that is entered by the user Dim data() As String 'used a temp counter Dim i As Integer 'used a temp counter Dim j As Integer 'used to store strings temp Dim temp As String For i = 1 To UBound(data) - 1 For j = i To UBound(data) If data(i) > data(j) Then temp = data(j) data(j) = data(i) data(i) = temp End If Next j Next i