Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations dencom on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Quick Treeview hint?

Status
Not open for further replies.

axel67

Technical User
Jan 2, 2007
21
Hi,
Anyone has an idea how to loop through all the childs of a selected treeview node, which is not the root node but let's say 3rd level node?

I did below but this just gives the direct children and does not further iterate into the remaining subchilds:



Set nodx = objTree.Nodes("Anode”).Child
For z = 1 To objTree.Nodes("Anode").Children
If nodx.Children = 0 Then

msgbox nodx.Text
End If
Set nodx = nodx.Next
Next


Thanks for any hint!
Axel

 
Do you know what is a recursive function ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Sorry haven't done this yet. I know "they" exist but I thought I could just reference a node and then go through the list.... :-(

I am already looking for hours but don't find any I understand. Do you have a "beginner" example?


Thanks,
Axel
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top