Select all rows in a list box

ghudson

Registered User.
Local time
Today, 03:34
Joined
Jun 8, 2002
Messages
6,193
I would like for my users to be able to double left click the list box and have the DblClick event select all rows (records) in a list box?

How can I do that with VBA?

Thanks in advance for your help!
 
'Select all entries in list box
Dim i as Integer
Dim intListCount as Integer

intListCount = lstEmployee.ListCount - 1

For i = 0 To intListCount
lstEmployee.Selected(i) = True
Next



'Place this code in the Dbl Click event of your list box.
'Change lstEmployee to the name of your list box
 
scottfarcus,

Works great! Thank you! :D
 

Users who are viewing this thread

Back
Top Bottom