How to use TreeView control

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

Please, I need help about how to use TreeView control properties trough VBA
for Applications in Microsoft Excel.


Regards!
 
A simple example

With Me
'>>>>> Specify the linestyle
.TreeView1.LineStyle = tvwRootLines
With .TreeView1.Nodes
'add a parent node
.Add , , "Dad", "Bill"
'now add child nodes
.Add "Dad", tvwChild, "Son1", "John"
.Add "Dad", tvwChild, "Son2", "Tommy"
.Add "Dad", tvwChild, "Daughter", "Mary"
'now add child of child nodes
.Add "Son2", tvwChild, "GrandDaughter", "Alison"
End With
End With


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top