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:
e.t.c, such that the data on the treeview control is as:
Beverage - Coffee
Fruit - Apple
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.