Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
i want to build a tree form look like
+XX X1 X2 X3 +YY Y1 Y2 Y3 i used some codes, TreeView1.Nodes.Clear TreeView1.Nodes.Add ([relative], [relationship], [key], text, [image], [selectedimage]) but i didn't build that form :( can you help me...¿ p.s.: i use treeview ActiveX control - version 6.0, from "Control Toolbox" |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Su
Private Sub Btn1_Click() Dim NodX As Node Dim L As Long With Treeview1 ..Nodes.Clear Set NodX = .Nodes.Add(, , "Root", "I am Root") NodX.Expanded = True Set NodX = Nothing Set NodX = .Nodes.Add("Root", tvwChild, "XX", "Item XX") Set NodX = Nothing For L = 1 To 5 Set NodX = .Nodes.Add("XX", tvwChild, "X" & L, "Item X" & L) Set NodX = Nothing Next Set NodX = .Nodes.Add("Root", tvwChild, "YY", "Item YY") Set NodX = Nothing For L = 1 To 5 Set NodX = .Nodes.Add("YY", tvwChild, "Y" & L, "Item Y" & L) Set NodX = Nothing Next End With End Sub -- HTH. Best wishes Harald Followup to newsgroup only please "Serkan" skrev i melding ... i want to build a tree form look like +XX X1 X2 X3 +YY Y1 Y2 Y3 i used some codes, TreeView1.Nodes.Clear TreeView1.Nodes.Add ([relative], [relationship], [key], text, [image], [selectedimage]) but i didn't build that form :( can you help me...¿ p.s.: i use treeview ActiveX control - version 6.0, from "Control Toolbox" |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thanks :),
-----Original Message----- Su Private Sub Btn1_Click() Dim NodX As Node Dim L As Long With Treeview1 ..Nodes.Clear Set NodX = .Nodes.Add(, , "Root", "I am Root") NodX.Expanded = True Set NodX = Nothing Set NodX = .Nodes.Add("Root", tvwChild, "XX", "Item XX") Set NodX = Nothing For L = 1 To 5 Set NodX = .Nodes.Add("XX", tvwChild, "X" & L, "Item X" & L) Set NodX = Nothing Next Set NodX = .Nodes.Add("Root", tvwChild, "YY", "Item YY") Set NodX = Nothing For L = 1 To 5 Set NodX = .Nodes.Add("YY", tvwChild, "Y" & L, "Item Y" & L) Set NodX = Nothing Next End With End Sub -- HTH. Best wishes Harald Followup to newsgroup only please "Serkan" skrev i melding ... i want to build a tree form look like +XX X1 X2 X3 +YY Y1 Y2 Y3 i used some codes, TreeView1.Nodes.Clear TreeView1.Nodes.Add ([relative], [relationship], [key], text, [image], [selectedimage]) but i didn't build that form :( can you help me...¿ p.s.: i use treeview ActiveX control - version 6.0, from "Control Toolbox" . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() note that Nodes.Clear can be VERY slow performance may increase dramatically if replaced with a simple loop: With treeview1.Nodes For i = .Count To 0 Step -1 .Remove (i) Next End With keepITcool < email : keepitcool chello nl (with @ and .) < homepage: http://members.chello.nl/keepitcool "Serkan" wrote: thanks :), -----Original Message----- Su Private Sub Btn1_Click() Dim NodX As Node Dim L As Long With Treeview1 ..Nodes.Clear Set NodX = .Nodes.Add(, , "Root", "I am Root") |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Accessing macro from a system by all other nodes on LAN | Excel Discussion (Misc queries) | |||
TreeView in Excel VBA | Excel Discussion (Misc queries) | |||
x-axis dates dont match up with the nodes on the line graph | Charts and Charting in Excel | |||
TreeView Object | New Users to Excel | |||
TreeView: add more than one node to nodes collection | Excel Programming |