Re: Is it possible to reverse the order of a listbox items?
how about?,,..
Code:
With ListBox1
Dim items(.Items.Count - 1) As Object ' create array to hold listbox items.
.Items.CopyTo(items, 0) ' copy listbox items to array.
.Items.Clear() ' clear listbox
Array.Reverse(items) ' reverse array
.Items.AddRange(items) ' add array to listbox.
End With
Re: Is it possible to reverse the order of a listbox items?
Else:
Code:
For i As Int32 = 0 To ListBox1.Items.Count - 2
ListBox1.Items.Insert(i, ListBox1.Items(ListBox1.Items.Count - 1))
ListBox1.Items.RemoveAt(ListBox1.Items.Count - 1)
Next