Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Treeview
I have a treeview (version 6.0) embedded in a worksheet. After I add a node
to the structure, I wish I could have the newly added treenode highlighted straight away so that the user could edit the label instantly, like what one can do with Microsoft Outlook, say adding a new folder. Is there a way doing so? Pls point me to the right direction. Thanks a lot. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Treeview
Hi
See if something like this works for you: Private Sub Btn1_Click() Dim Nodx As Node Set Nodx = Me.Tvw1.Nodes.Add("Root", _ tvwChild, "N" & Tvw1.Nodes.Count + 1, "New node") Nodx.EnsureVisible Nodx.Selected = True Tvw1.LabelEdit = tvwAutomatic Tvw1.StartLabelEdit Set Nodx = Nothing End Sub (I wrote this with VB6. Maybe the objects will need a different addressing from Excel, but you obviously know how to do that part.) HTH. Best wishes Harald "Patrick Choi" skrev i melding ... I have a treeview (version 6.0) embedded in a worksheet. After I add a node to the structure, I wish I could have the newly added treenode highlighted straight away so that the user could edit the label instantly, like what one can do with Microsoft Outlook, say adding a new folder. Is there a way doing so? Pls point me to the right direction. Thanks a lot. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
TreeView Object | New Users to Excel | |||
Treeview in excel | Excel Programming | |||
How to Treeview in VBA | Excel Programming | |||
TreeView | Excel Programming | |||
Treeview | Excel Programming |