Highlight everything in a Listbox

  • Thread starter Thread starter Bob
  • Start date Start date
B

Bob

Is there a code to add to a button to highlight everything (line) in a list
box?

Thanks in advance.........Bob Vance
 
Oops, Just discovered by changing it to (Extended) and using the shift key
does it...Is this acceptable?? Thanks Bob
 
Is there a code to add to a button to highlight everything (line) in a list
box?

Thanks in advance.........Bob Vance

Make sure the ListBox MultiSelect property is set to either Simple or
Extended.

Dim x as Integer
For x = 0 To ListBoxName.ListCount - 1
Me.ListBoxName.Selected(x) = True
Next x
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top