Solved

TreeView Component In Excel

Posted on 2007-11-21
2
712 Views
Last Modified: 2013-12-25
Trying to use treeview component within excel.   I was able to get this work for 1 set of Parent Child relationships.  
I need to build another treeview component to work off the first treeview component where when the user checks off Parent or child in the first tree the 2nd tree automatically finds the Children in the 2nd Tree.
ExAMPLE:

Tree 1                                       Tree2
X Parent1                                     X Child1
      XCHild1                                        SubChild2
      Child2                                          SubChild3
      Child3                                       Child2
0
Comment
Question by:Good5388
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 9

Expert Comment

by:dmang
ID: 20327995
Hi there

Why not build int all in the same treeview?

regards
dmang
0
 
LVL 48

Accepted Solution

by:
jpaulino earned 500 total points
ID: 20334373
Hi Good5388,

You can do a search in the other treeview (treeview2) and select the item. for the treeview1 add this code

Private Sub TreeView1_NodeClick(ByVal Node As MSComctlLib.Node)
Dim myNode As Node
For Each myNode In TreeView2.Nodes
 If Node.Text = myNode.Text Then
   myNode.Selected = True
   Exit For
 End If
Next
End Sub

In order to see the selection you have to unhide the selection

TreeView1.HideSelection = False
TreeView2.HideSelection = False
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question