Hi there
I've added a user control in Excel2007. Within this control is a MS TreeView Control 6.0.
During the user control intialization, nodes are added to the treeview:
I expected to display to be like this:Me.TreeView_Audituniverse.Nodes.Clear Me.TreeView_Audituniverse.Nodes.Add Key:="Key1", Text:="Key1" Me.TreeView_Audituniverse.Nodes.Add relative:="Key1", relationship:=tvwChild, Key:="Key2", Text:="Key2" Me.TreeView_Audituniverse.Nodes.Add relative:="Key2", relationship:=tvwChild, Key:="Key3", Text:="Key3" Me.TreeView_Audituniverse.Nodes.Add relative:="Key2", relationship:=tvwChild, Key:="Key4", Text:="Key4"
Key1-Key2But when I try it, no hierarchy is displayed and the control looks like:-Key3
-Key4
Key4
Key3
Key2
Key1
Does anybody has an idea what I'm missing???
Thanks, Pi
Last edited by pi3412; 12-07-2010 at 10:50 AM.
Can you post workbook example as your test code appears to build the tree correctly.
For me Key1 is the only item displayed. I have to expand the node to see the other items but they are there.
Andy, thank you for your reply!
Please find attached a workbook with the example from my first mail.
There is also a screenshot of the TreeView how it appears on my machine.
Best regards
Pi
Your file does not have a reference to the library, MSCOMCTL, so there is no definition for the const tvwChild.
Const tvwChild = 4
Andy
thank you very much for your kind support, it's so much appreciated!!!
This was the cause!
I wish you a beautiful day
Pi
If you are satisfied with the solution(s) provided, please mark your thread as Solved.
How to mark a thread Solved
Go to the first post
Click edit
Click Go Advanced
Just below the word Title you will see a dropdown with the word No prefix.
Change to Solved
Click Save
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks