I having trouble with recognizing selected items in Check List Box.
For example, I want the following code to print the only non selected items in a file. However the line "If Not chkToDo.Items.Item(j).checked Then" is not working. In fact, I don't find any drop down after Item(). - I'm only getting GetType().

Can anyone show light??

Thanx


Public Sub WriteToDoInFile()
'write to do unchecked lists in file
Dim i, j As Integer
i = chkToDo.Items.Count
Try
FileOpen(2, "ToDo.txt", OpenMode.Output)
For j = 0 To i - 1
If Not chkToDo.Items.Item(j).checked Then
Print(2, chkToDo.Items.Item(j) & vbCrLf)
End If
Next
FileClose(2)
Catch x As System.Exception
MessageBox.Show(x.ToString, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
End Sub