ListBox Select all

  • Thread starter Thread starter Bret
  • Start date Start date
B

Bret

Please..
I have a listbox in a form with about 100 records with
the multiselect feature activated.
I want to add a button that selects all records in the
listbox. What would the code be for this?

thank you. thank you!
 
Hi,

Dim i As Integer
For i = 0 To Me.List0.ListCount - 1
Me.List0.Selected(i) = True
Next i

Just substitute the name of your listbox.

HTH
Dan Artuso, MVP
 
Back
Top