VB Code:
  1. 'data that is entered by the user
  2. Dim data() As String
  3. 'used a temp counter
  4. Dim i As Integer
  5. 'used a temp counter
  6. Dim j As Integer
  7. 'used to store strings temp
  8. Dim temp As String
  9.  
  10.  
  11. For i = 1 To UBound(data) - 1
  12.     For j = i To UBound(data)
  13.         If data(i) > data(j) Then
  14.             temp = data(j)
  15.             data(j) = data(i)
  16.             data(i) = temp
  17.         End If
  18.     Next j
  19. Next i