View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
RB Smissaert RB Smissaert is offline
external usenet poster
 
Posts: 2,452
Default Extracting Relative Propert of TreeView Node

The Relative argument only makes sense when adding nodes and if you are
adding nodes then you will know
what the Relative is you are adding to, so I don't quite understand the
question.

Maybe this will get you on the right track.

Sub test()

Dim oNode As Node

For Each oNode In MainForm.TreeView1.Nodes
If oNode.Text = "testing" Then
MsgBox oNode.Previous Is Nothing, , "child node?"
Exit For
End If
Next oNode

End Sub


RBS


"ExcelMonkey" wrote in message
...
I know tha the properties of a TreeView node are as seen below:

TreeView1.Add(Relative, Relationship, Key, Text)

How do I extract the Relative Property if I know the Text Property? That
is
I know a specific node has a text property of "X". I want to use this to
identify the node and back out the relative property.

Thanks

EM