Results 1 to 3 of 3

Thread: Listbox check

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2002
    Location
    Pilipinas
    Posts
    441

    Listbox check

    List1.Style = CheckBox

    How to check.???
    List1.List(1).Checked = True doesn't work??

  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: Listbox check

    Try this:

    VB Code:
    1. Option Explicit
    2.  
    3. ' Set Listbox style to Checkbox
    4.  
    5. Private Sub Form_Load()
    6.   Dim x As Integer
    7.   For x = 1 To 5
    8.     List1.AddItem x
    9.   Next x
    10. End Sub
    11.  
    12. Private Sub List1_Click()
    13.   List1.Selected(List1.ListIndex) = True
    14. End Sub

  3. #3
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: Listbox check

    Why not use a ListView (set to Report View) if you want checkboxes. And it it much better then listbox anyway.

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