Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ListBox Checkboxes syntax

Status
Not open for further replies.

billybobk

Programmer
Oct 14, 2002
130
US
I have a listbox control with Style set to '1' Checkboxes. There is a list, some are checked the rest aren't. I want to say:
------------------------
If the box is for this item is checked then
call do_this
Else if the box is not checked
call do_that
End If
------------------------

Anybody know the syntax? Thanks!


--Bill
Beeeeer....Mmmmmmmmmm.
-Homer Simpson
 
Here's an example of looping through a listbox to check which items are selected.
Code:
 Dim i%
For i = 0 To List1.ListCount - 1
  If List1.Selected(i) = True Then
      MsgBox "yes"
  Else
    MsgBox "no"
End If
DoEvents
Next i
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top