Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multi-Select Listbox

Status
Not open for further replies.

Angelique

Technical User
Mar 9, 2001
127
AU
Playing with multiple select from a listbox and would like to be able have command buttons like the wizards:

1. Select All
2. Deselect All

The user can double-click to deselect but it isn't very efficient. If the user wants all the fields, again clicking each one is time consuming.

The property of the listbox is "simple" and I am using the [TrainingID] but it could be anything because I might use it for several reports.

Any ideas out there?


Want to thank those people who have made this forum such a valuable place to visit each day.


Angelique
 
Hi!

There are codes from my application. Maybe these would be helped you:

Private Sub pbSelectAll_Click()
Dim i As Byte

For i = 0 To Me.lst10Unt.ListCount - 1
Me.lst10Unt.Selected(i) = True
Next i
Me.pbOK.Enabled = True
End Sub

Private Sub pbDeselectAll_Click()
Dim i As Byte

For i = 0 To Me.lst10Unt.ListCount - 1
Me.lst10Unt.Selected(i) = False
Next i
Me.pbOK.Enabled = False
End Sub

Aivars
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top