ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Tag Property for TreeView Node (https://www.excelbanter.com/excel-programming/434096-tag-property-treeview-node.html)

ExcelMonkey

Tag Property for TreeView Node
 
Do indivua nodes in TreeViews have a Tag property in VBA? IF so, how you
access it upon adding the node? The code below addes the node.

UserForm1.TreeView1.Nodes.Add relative:="TypeA", _
relationship:=tvwChild, _
Key:= "text1" & ":" & "text2", _
Text:= "text3" & ":" & "text4"

Thanks

EM

RB Smissaert

Tag Property for TreeView Node
 
Dim oNode As Node

Set oNode = UserForm1.TreeView1.Nodes.Add(relative:="TypeA", _
relationship:=tvwChild, _
Key:= "text1" & ":" & "text2", _
Text:= "text3" & ":" & "text4")

oNode.Tag = "Tag1" 'or whatever, it can be arrays


RBS





"ExcelMonkey" wrote in message
...
Do indivua nodes in TreeViews have a Tag property in VBA? IF so, how you
access it upon adding the node? The code below addes the node.

UserForm1.TreeView1.Nodes.Add relative:="TypeA", _
relationship:=tvwChild, _
Key:= "text1" & ":" & "text2", _
Text:= "text3" & ":" & "text4"

Thanks

EM




All times are GMT +1. The time now is 09:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com