Greetings.
I would like to populate a treeview control with data on two colums on a range. I have never used it so im unfamiliar with its events and properties.
I have two columns of data in columns A and B, titled "Category" and "Item".I would like to populate treeview control with UNIQUE values in the "Category" column as the parent nodes, with their corresponding values in "Item" as the child nodes. I want the code to fetch the values of each parent and its corresponding children. The data range is as:
Category Item
Beverage Coffee
Fruit Apple
Snack Bisquit
Beverage Lemonade
Fruit Mango
e.t.c, such that the data on the treeview control is as:
Node(s) Child(ren)
Beverage - Coffee
- Lemonade
Fruit - Apple
- Mango
e.t.c
The data range ( "A1:B500") is not formatted in any way.I want the code to populate the control on loading a form containing the treeview control.Please comment on any code so that I understand what is going on.
PS: I would also later want to run a procedure based on the selections.
For the sake of clarity, Please find attatched a workbook.Thank you in anticipation.
Actuarish.