Link to home
Start Free TrialLog in
Avatar of VKugel

asked on

Find Selected Items in a TreeView Control

I have a treeview control that has three layers. Parent, Child, Child of Child. I have check boxes enabled. How can I loop through the treeview and find the key field information for the child of the child if it is checked?

Private Sub SubUpdateRepairs()
Dim i As Integer
For i = 0 To TV1.Nodes.Count - 1
Next i
End Sub
Avatar of Dana Seaman
Dana Seaman
Flag of Brazil image

 Dim nod As Node  
 For i = 1 To TreeView1.Nodes.Count
      If TreeView1.Nodes(i).Checked Then
         'do something
         Set nod = TreeView1.Nodes(i)
         Debug.Print nod.Text
      End If
   Next i
Avatar of VKugel

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial