Hi,
I have a userform in which I have a TreeView and a ComboBox:
My goal now is that when I select a parent node in the TreeView, that only certain items from the ComboBox are displayed to me. For example: I select Item2 and in the ComboBox Case 1 and Case 3 are only shown to me.
How can I actually do this and is it possible?
I have a userform in which I have a TreeView and a ComboBox:
VBA Code:
Private Sub UserForm_Initialize()
With TreeView1.Nodes
.Add , , "A", "Item1"
.Add "A", tvwChild, , "SubItem1"
.Add , , "B", "Item2"
.Add "B", tvwChild, , "SubItem2"
End With
With ComboBox1
.AddItem "Case1"
.AddItem "Case2"
.AddItem "Case3"
.AddItem "Case4"
End With
End Sub
My goal now is that when I select a parent node in the TreeView, that only certain items from the ComboBox are displayed to me. For example: I select Item2 and in the ComboBox Case 1 and Case 3 are only shown to me.
How can I actually do this and is it possible?