hindersaliva
asked on
Excel - TreeView Control - reading tree items
I have a TreeView control on a UserForm which is populated from a 'map structure' in a database table.
I can make it possible to drag and drop between nodes.
Now I want to be able to 'read' the modified TreeView so that I can upload the map back to the database.
Does anybody know how to 'read' the TreeView?
ie. from the Root read each node and child nodes etc. loop through all.
te. Extract ParentID, Name, ThisItemID.
Thanks.
I can make it possible to drag and drop between nodes.
Now I want to be able to 'read' the modified TreeView so that I can upload the map back to the database.
Does anybody know how to 'read' the TreeView?
ie. from the Root read each node and child nodes etc. loop through all.
te. Extract ParentID, Name, ThisItemID.
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No problem.
ASKER
Imnorie,
I'm struggling with how to start it off.
Do you have a code sample that calls the Sub? ie. with the initial value of objNode
For me it will be the Root.
(This is exciting)
Thanks
I'm struggling with how to start it off.
Do you have a code sample that calls the Sub? ie. with the initial value of objNode
For me it will be the Root.
(This is exciting)
Thanks
Something like this perhaps.
If it has something different use that.
Dim ptnode As Node
Set ptnode = TreeView1.Nodes("Root")
Call TraverseTree(ptnode)
This will only work if your 'root' node has the key value 'Root'.If it has something different use that.
ASKER
imnorie
Yes that worked great.
Thanks
Yes that worked great.
Thanks
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
ASKER
That's exactly what I was after. I shall load it into an array (and then have several selectable choices).
Thanks!