Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.visual.basic    |    MS Visual Basic discussions, NOT dot-net    |    10,840 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 8,857 of 10,840    |
|    Randy Birch to Maarten    |
|    Re: checkbox in listbox?    |
|    06 Oct 04 22:14:15    |
      From: rgb_removethis@mvps.org              Private Sub Form_Load()               Dim cnt As Long               For cnt = 1 To 10        List1.AddItem "Item " & cnt        Next               Command1.Caption = "Get selected items"        Command2.Caption = "Clear selection"              End Sub              Private Sub Command1_Click()               Dim cnt As Long               With List1               If .SelCount > 0 Then        For cnt = 0 To .ListCount - 1        If .Selected(cnt) = True Then        Debug.Print .List(cnt)        End If        Next        End If               End With              End Sub                     Private Sub Command2_Click()               Dim cnt As Long               With List1               If .SelCount > 0 Then               For cnt = 0 To .ListCount - 1        .Selected(cnt) = False        Next               End If               End With                     End Sub                            --                     Randy Birch       MS MVP Visual Basic       http://vbnet.mvps.org/                     "Maarten" |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca