List boxes, Arrays and Sorting

  • Thread starter Thread starter Stuart
  • Start date Start date
S

Stuart

If i use the following method to populate a list box, presumably the info
will be held in an Array, Is it possable to sort this array without having
to resort to placing the contents into a range on another worksheet, sortint
it, then repopulating the list box!

Stuart


With lBox2
For Each rng In Selection
If rng <> "" Then
For i = 1 To .ListCount
If rng = .List(i) Then Exit For
Next i
If i = .ListCount + 1 Then .AddItem rng
End If
Next rng
End With
 
Back
Top