Is it possible to list all the items in a TreeView? Not the Count, but all the items in it.
Also, How can you check if an item is already in the TreeView, and if it is then don't add it?
Thanks in advance :thumb:
Printable View
Is it possible to list all the items in a TreeView? Not the Count, but all the items in it.
Also, How can you check if an item is already in the TreeView, and if it is then don't add it?
Thanks in advance :thumb:
To check for and disallow duplicates, add a key to each node. Keys must be unique or a trappable error is raised.VB Code:
Dim lngIndex As Long For lngIndex = 1 To MyTV.Nodes.Count Debug.Print MyTV.Nodes(lngIndex).Text Next
Thanks, MartinLiss.