+ Reply to Thread
Results 1 to 3 of 3

present data as hierarchy/tree structure in user form

  1. #1
    Malin
    Guest

    present data as hierarchy/tree structure in user form

    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

  2. #2
    Tom Ogilvy
    Guest

    Re: present data as hierarchy/tree structure in user form

    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

    --
    Regards,
    Tom Ogilvy

    "Malin" <[email protected]> wrote in message
    news:[email protected]...
    > 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




  3. #3
    Forum Contributor
    Join Date
    12-11-2004
    MS-Off Ver
    2007
    Posts
    137
    Hello malin , Hello Tom

    you may try to use a TreeView in Excel to show your structure

    there is an example in this zipped workbook

    http://www.excel-downloads.com/html/...2_TreeView.zip

    the datas are in the second sheet



    I hope this help you
    Regards ,
    michel

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1