sir help me how to disabled a checkbox. for example once i check the checkbox it should appear in my list? when im uncheck it... it should not appear in my list? tnx..

try using this sample code.

Private Sub CHKCOLOR_Click(Index As Integer)
If CHKCOLOR(Index) Then
List1.AddItem CHKCOLOR(Index).Caption
Else
For L = 0 To (List1.ListCount - 1)
If List1.List(L) = CHKCOLOR(Index).Caption Then
List1.RemoveItem L
End If
Next
End If
End Sub

The code uses control array for the check boxes.

what was appear and not appear in your list?
if u want to disable check box :

Check2.Enabled = False

My previous code adds the items to listbox on check of check boxes and removes them from the list on uncheck.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.