|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Checked List Box HelpI am populating a Checked List box from a stored proc... CheckedListBox1.DataSource=dsStates.Tables("States") CheckedListBox1.DisplayMember = "State" CheckedListBox1.DisplayMember = "State" "State" is the column in the table... And the above works fine... All the states are shown in the CheckedListBox I then want to loop thru to find the ones that were checked (process is invoked from a button)... Dim i as integer For i=0 to CheckedListBox1.Items.Count -1 If CheckedListBox1.GetItemChecked(i)= true then Msgbox ("Checked: " & CheckedListBox1.GetItemText(i)) End if Next The above code will give me the integer associated with the row number, but how do I return the value of the rows contents (i.e., FL) ? For Each Item As Object In CheckedListBox1.CheckedItems
MsgBox(CheckedListBox1.GetItemText(Item)) Next For Each Item As Object In CheckedListBox1.CheckedItems
MsgBox(CheckedListBox1.GetItemText(Item)) Next Thank you very much !
Show quoteHide quote "c_shah" <shah.chi***@netzero.net> wrote in message news:1152719000.731753.242170@35g2000cwc.googlegroups.com... > For Each Item As Object In CheckedListBox1.CheckedItems > MsgBox(CheckedListBox1.GetItemText(Item)) > Next > |
|||||||||||||||||||||||