Code: Select all
Private Sub CONTA_COMUNI()
Dim MYNODE As Node
Dim NRTOT As Long
For Each MYNODE In Me.TreeView1.nodes
If MYNODE.children = 0 Then
NRTOT = NRTOT + 1
End If
DoEvents
Next
Me.LNRC.Caption = Format(NRTOT, "#,##0")
DoEvents
End Sub
i ned to loop all item in CN-CUNEO
see image