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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

COUNT all items in trteeview in last level 1

Status
Not open for further replies.

2009luca

Programmer
Jul 27, 2013
222
IT
How to count COUNT all items in trteeview in last level?
tks
 
54 threads started so far...

So, what have you tried?

Post your code and any subsequent errors.
 
As ever II suspect you have not actually giveren us your full requirement, but an answer to the request you have made might be

Code:
[COLOR=blue]Private Sub walktree()
    Dim mynode as Node
    Dim grandtotal as Long

    For Each mynode In TreeView1.Nodes
        If mynode.Children = 0 Then
            grandtotal = grandtotal + 1
        End If
    Next
    MsgBox grandtotal

End Sub[/color]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top