Results 1 to 2 of 2

Thread: Listbox select all

  1. #1

    Thread Starter
    New Member
    Join Date
    Aug 2000
    Posts
    4

    Red face

    hey ive been trying to select all the items in a listbox

    I have a button and i want it to highlight all the the items in the listbox. I know it involves a loop or something but i dont know how to make it highlighted. PLEASE HELP i think my brain is gonna leak out my ears

  2. #2
    Guest
    Code:
    Private Sub Command1_Click()
        For i = 0 To List1.ListCount - 1
            List1.Selected(i) = True
        Next
    End Sub

    PS: The ListBox has to have the MultiSelect property set to true.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width