count sub item in child treeview

User avatar
sal21
PlatinumLounger
Posts: 3676
Joined: 26 Apr 2010, 17:36

count sub item in child treeview

Post by sal21 »

How to conut occurrence on hightlight node, on click event?

in this case i see 3 occurrence

IMPARATO...
ALBANO...
DE ROSA...

my test on debug.print:

....
Set TN = .HitTest(X, Y)

If Not TN Is Nothing Then

RIGA = TN.Index
TEST = .Nodes(RIGA).Image

Select Case TEST

Case 4

Set .DropHighlight = .HitTest(X, Y)
.SelectedItem = .DropHighlight
Set moDragNode = .SelectedItem

'Debug.Print .SelectedItem(RIGA).Children.Count

...
You do not have the required permissions to view the files attached to this post.

SpeakEasy
NewLounger
Posts: 22
Joined: 27 Jun 2021, 10:46

Re: count sub item in child treeview

Post by SpeakEasy »

You don.t need the .Count

Code: Select all

Debug.Print .SelectedItem.Children
should do the trick