Jobs
Author: Richard Bishop Date Submitted: 5/13/2005 Category: Other Compatibility: VB 6 This code has been accessed 5999 times.
Email Yourself this snippet:
You will need a list box and 2 command buttons. Set the listbox style property to 1 - Checkbox Call the first command button cmdFill Call the second command button cmdRemove
Code
Option Explicit Dim i As Integer Private Sub cmdFill_Click() For i = 1 To 20 List1.AddItem i Next i End Sub Private Sub cmdRemove_Click() Dim i As Integer For i = List1.ListCount - 1 To 0 Step -1 If List1.Selected(i) = True Then List1.RemoveItem (i) End If Next i End Sub