CodeItBetter Programming Another VB Programming Blog

How to sort a list of random numbers in List box at run time

Posted on January 4, 2009
1
2
3
4
5
6
7
8
'Controls - How to sort a list of random numbers in List box at run time
'Add another listbox (list2) and set .Visible = False and .Sorted = True.
'Then to add an item to your listbox do:

Private Sub AddToList(ByVal lNum As Long)
    List2.AddItem Right$(String(10, "0") & lNum, 10)
    List1.AddItem lNum, List2.NewIndex
End Sub
Filed under: Controls Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


 

No trackbacks yet.