Private Sub Command1_Click() Dim i As Integer With List1 For i = 0 To .ListCount If .ListCount = .SelCount Then Exit For If .Selected(i) = False Then .RemoveItem i i = i - 1 End If Next End With End Sub
Private Sub Command1_Click() Dim i As Integer With List1 For i = 0 To .ListCount - 1 If .Selected(i) = False Then .ListIndex = i Exit For End If Next End With End Sub