Public Sub basPopTV(tv As MSComctlLib.TreeView) ' 'This sub demonstrates the "hard code" way of 'populating a Microsoft TreeView Control. ' With tv .LabelEdit = tvwAutomatic .Style = tvwTreelinesPlusMinusText .LineStyle = tvwRootLines
Set m_tvNode = .Nodes.Add(Key:="Root1", _
Text:="Root1")
'Add child Nodes.
Set m_tvNode = .Nodes.Add(Relative:="Root1", _
Relationship:=tvwChild, Key:="Key1.1", _
Text:="1.1")
Set m_tvNode = .Nodes.Add(Relative:="Root1", _
Relationship:=tvwChild, Key:="Key1.2", _
Text:="1.2")
Set m_tvNode = .Nodes.Add(Relative:="Root1", _
Relationship:=tvwChild, Key:="Key1.3", _
Text:="1.3")
.Nodes(1).Expanded = True
.Nodes(1).Bold = True
Set m_tvNode = Nothing
End With
End Sub