: There are a couple of ways of doing this. here's one (taken from MSDN) which uses the CheckedItems property:
:
: ' Determine if there are any items checked.
: If CheckedListBox1.CheckedItems.Count <> 0 Then
: ' If so, loop through all checked items and print results.
: Dim x As Integer
: Dim s As String = ""
: For x = 0 To CheckedListBox1.CheckedItems.Count - 1
: s = s & "Checked Item " & (x + 1).ToString & " = " & CheckedListBox1.CheckedItems(x).ToString & ControlChars.CrLf
: Next x
: MessageBox.Show(s)
: End If
:
: You can also use the GetItemChecked Method in pretty much the same way.
:
: Dim i As Integer
: Dim s As String
: s = "Checked Items:" & ControlChars.CrLf
: For i = 0 To (CheckedListBox1.Items.Count - 1)
: If CheckedListBox1.GetItemChecked(i) = True Then
: s = s & "Item " & (i + 1).ToString & " = " & CheckedListBox1.Items(i).ToString & ControlChars.CrLf
: End If
: Next
: MessageBox.Show(s)
:
: If you want to pursue the available methods even further, there are also GetItemCheckState method and the CheckedIndices Collection to look at.
: Let me know if you need more info on any of these.
:
: Ged
:
:
:
Thanx...That's exactly what I was looking for!
Jim (eman2a)