Click here to Skip to main content
15,893,564 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi ,


I Have a listview with two colomns(name and surname) and checkboxes , i want to dispay the name of a checked item(Name and surname) in a message box this is my code please assist


VB
Dim itemChecked As ListViewItem

For Each itemChecked In listview1.Items

   MsgBox(itemChecked.Text)
              
Next
Posted

1 solution

use SubItems
VB
For Each itemChecked In listview1.Items

   MsgBox(itemChecked.SubItems(0).Text)
   'MsgBox(itemChecked.SubItems(1).Text)
Next
 
Share this answer
 
Comments
Member 10872502 22-Jan-15 6:00am    
It worked thank you

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900