Unable to check/uncheck listview checkbox

Hi,

I have a listview control with checkboxes. I am able to select any item by clicking on the text and the checkbox is checked/unchecked. However, when I attempt to select the item by clicking on the checkbox, I am unable to check/uncheck the text box.

Your help is appreciated.

Thanks

Steve
welcomesAsked:
Who is Participating?
 
Ryan ChongConnect With a Mentor Commented:
Glad you resolved your problem, since then i got 2 suggestions:

1. Post a request at Community Support to have a refund , or
2. Accept my comment as the Answer, ONLY if you think i did make some help here

cheers ;-)
0
 
Ryan ChongCommented:
Did you write scripts inside the ListView's ItemCheck Event ? Try check the script logic behind as you may check the checkbox while it's unchecked.

Post your scripts here if necessary, regards
0
 
welcomesAuthor Commented:
Thanks. I believe I finally got it working. FYI, here is the ItemCheck code...

Private Sub lstvwSector_ItemCheck(ByVal Item As MSComctlLib.ListItem)
    Dim i As Integer
   
    i = Item.index
   
    If lstvwSector.ListItems.Item(i).Checked = True Then
        lstvwSector.ListItems.Item(i).Checked = False
    Else
        lstvwSector.ListItems.Item(i).Checked = True
    End If
   
    lstvwSector.ListItems.Item(i).Selected = True
   
End Sub
0
All Courses

From novice to tech pro — start learning today.