Results 1 to 4 of 4

Thread: checkbox in listbox

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Posts
    6

    Exclamation

    Hi,

    Im using a listbox to display a few things from a database. The style is "checkbox" and i would like to know how to check if the checkboxes are checked. Whats the command to see if the boxes are checked in a listbox?


  2. #2
    New Member Wonder Woman's Avatar
    Join Date
    May 2000
    Posts
    9
    If List1.Selected(List1.ListIndex) = True Then MsgBox List1.Text
    100% Wonder Woman

  3. #3
    Lively Member
    Join Date
    Mar 2000
    Location
    LewZer-LanD
    Posts
    120
    Code:
    For n = 1 to List1.ListCount
         If List1.Selected(n) = True Then
              'wow.. item n in the list box is checked!
              'Todo: Add code here
         End If
    Next n

    hope that helps!!
    Kid A

    18 Year Old Programmer
    Visual Basic 6 & .NET Enterprise, ASP, WinXP (Advanced Server) Administration, HTML, Graphic Arts, Winsock, Learning VC++ and now maybe C#.. heh
    [vbcode]
    'back in the day vb6 code
    Private Sub My_Life()
    If Hour(Now) > 3 And Hour(Now) < 13 Then
    Status = "Sleeping"
    Else
    Status = "Computing"
    End If
    End Sub
    [/vbcode]

  4. #4

    Thread Starter
    New Member
    Join Date
    Sep 2000
    Posts
    6

    Wink

    That was exactly what i was after! Thank you very much!

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