Hi

Does this helps?

Here’s a sub that you can call to sort the data in a ListBox. It sorts in alphabetical order.

VB Code:
  1. Sub SortListBox(oLb As MSForms.ListBox)
  2.     Dim vaItems As Variant
  3.     Dim i As Long, j As Long
  4.     Dim vTemp As Variant
  5.    
  6.     ‘Put the items in a variant array
  7.     vaItems = oLb.List
  8.    
  9.     For i = LBound(vaItems, 1) To UBound(vaItems, 1) - 1
  10.         For j = i + 1 To UBound(vaItems, 1)
  11.             If vaItems(i, 0) > vaItems(j, 0) Then
  12.                 vTemp = vaItems(i, 0)
  13.                 vaItems(i, 0) = vaItems(j, 0)
  14.                 vaItems(j, 0) = vTemp
  15.             End If
  16.         Next j
  17.     Next i
  18.    
  19.     ‘Clear the listbox
  20.     oLb.Clear
  21.    
  22.     ‘Add the sorted array back to the listbox
  23.     For i = LBound(vaItems, 1) To UBound(vaItems, 1)
  24.         oLb.AddItem vaItems(i, 0)
  25.     Next i
  26.    
  27. End Sub

Hope this helps...