For i = 0 To List.ListCount - 1
List.Selected(i) = True
Next i
For i = 0 To List.ListCount - 1
List.Selected(i) = False
Next i
For i = List.ListCount - 1 To 0 Step -1
List.RemoveItem i
Next i
Or
List.Clear
For i = List.ListCount - 1 To 0 Step -1
If List.Selected(i) Then
List.RemoveItem i
End If
Next i
Copy selected items from one to another
For i = 0 To
ListSource.ListCount - 1
If
ListSource.Selected(i) Then
ListTarget.AddItem ListSource.List(i)
End If
Next i
"Move" selected items from one to another
For i =
ListSource.ListCount - 1 To 0 Step -1
If
ListSource.Selected(i) Then
ListTarget.AddItem ListSource.List(i)
ListSource.RemoveItem i
End If
Next i
Private Sub ListSource_DblClick()
ListTarget.AddItem
ListSource.List(ListSource.ListIndex)
End Sub
Private Sub ListSource_DblClick()
ListTarget.AddItem
ListSource.List(ListSource.ListIndex)
ListSource.RemoveItem ListSource.ListIndex
End Sub