Pages

Wednesday 3 February 2010

How to multiple selected items from List Box (VB6)?

Ever wondered how to remove multiple selected items from list box in VB6? Trick here is loop through listbox in REVERSE.

Here is the sample and enjoy :-)

Dim intCount As Integer

For intCount = (lstSample.ListCount -1 1) To 0 Step -1

If lstSample.Selected(intCount) Then

lstSample.RemoveItem intCount

End If

Next

No comments:

Post a Comment