Hi there,

In an attempt to programmatically select all the items in a ListBox, I created the following little algorithm:

Code:
Dim index As Integer
While index < ListBox_Available.Items.Count
    ListBox_Available.SetSelected(index, True)
    index = index + 1
End While
As amusing as it is to watch the items get selected one by one as the index is incremented, this isn't exactly what I had in mind. I want to select ALL the items in a list so I can pass it to a generic Sub that handles dealing with the list's selections.

I found a very convenient ClearSelected method but not its logical counterpart, SelectAll (or something to that effect).

Has anyone ever attempted to do this? If so, how?

Yours boggled,
Mightor