present data as hierarchy/tree structure in user form

  • Thread starter Thread starter Malin
  • Start date Start date
M

Malin

I have a work sheet in excel with data in 8 different columns. By
using a macro I can view this data with drop down lists in a user
form, like with auto filters in the user form. I would like to show
the data in another way and would like to know if it is possible to
build a tree structure in the user form instead?

Example:

Cars
BMW
Mercedes
Audi
Bicycles
Crescent
Monark
BMX

Instead of choosing Cars and Bicycles in drop down lists I would like
a tree structure to expand when clicking on the word Cars (BMW,
Mercedes, Audi then appears beneath) for instance in the user form.

The functionality is similar to having groups in the work sheet except
I would like it to be presented in a user form instead.

Grateful for all the help I can get!

/Malin
 
the simplest approach is to populate a listbox/combobox using code and
indent some of the items by prepending/padding them with spaces.

There is no control shipped with Office that does this. If you have VB6 you
might look at the treeview control
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top