Treeview control in an Excel form

G

Guest

Can anyone tell me how do you add nodes to a Treeview control, how do you activate its events and retrieve the highlighted node? The properties window doesn't seem to have any Contolsource property or the like. I'm using Microsoft TreeView Control 6.0
 
G

Guest

You can use the Forms Activate Event to add your node
Me.TreeView1.Nodes.Add.Text = "FirstOne
Me.TreeView1.Nodes.Add.Text = "SecondOne

As far as the events: you should find them in your code window when you select the Treeview's control in the left dropdown box of your code window
 
G

Guest

To add child nodes use the Add method of Nodes.
Me.TreeView1.Nodes.Add , , , "FirstOne
Me.TreeView1.Nodes.Add 1, 4, , "A"

----- chris wrote: ----

You can use the Forms Activate Event to add your node
Me.TreeView1.Nodes.Add.Text = "FirstOne
Me.TreeView1.Nodes.Add.Text = "SecondOne


As far as the events: you should find them in your code window when you select the Treeview's control in the left dropdown box of your code window
 

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

Top