Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Treeview Control Populating Problem
I am trying to populate a Treeview control with parent Plans and their
child Groups. I wrote code that should generate the following: Plan 1 ==Group 1 ==Group 2 Plan 2 ==Group 1 ==Group 2 ==Group 3 ==Group 4 Plan 3 ==Group 1 ==Group 2 ==Group 3 ==Group 4 ==Group 5 When the code runs, I only see the following in the treeview: Plan 1 ==Group 1 ==Group 2 Plan 2 ==Group 3 ==Group 4 Plan 3 ==Group 5 Here is my code. The variable "UBound(gPlanData(i).Group)" is 2, 4, 5 for each plan. With Me.tvPlanGroup For i = 1 To 3 Set nodX = .Nodes.Add(, , "Plan " & i, gPlanData(i).Name) Set nodX = Nothing y = UBound(gPlanData(i).Group) For j = 1 To y Set nodX = .Nodes.Add("Plan " & i, tvwChild, _ "Group " & j, gPlanData(i).Group(j).Name) nodX.EnsureVisible Set nodX = Nothing Next j Next i End With If there are fewer groups for each subsequent plan, they don't show up in the tree. This in code: Plan 1 ==Group 1 ==Group 2 Plan 2 ==Group 1 ==Group 2 Plan 3 ==Group 1 ==Group 2 Shows in my tree as this: Plan 1 ==Group 1 ==Group 2 Plan 2 Plan 3 Please help me figure out why this is behaving this way. Thanks in advance, Erika. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Treeview Control Populating Problem
I figured it out. I had the same Key for my group names, so only new,
unique groups were showing. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Problem with control tag and populating speadsheet | Excel Discussion (Misc queries) | |||
Treeview Control | Excel Programming | |||
Need help with Treeview control ?? | Excel Programming | |||
Treeview Control populating | Excel Programming | |||
TreeView Control | Excel Programming |