+ Reply to Thread
Results 1 to 3 of 3

Collapse treeview list

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Collapse treeview list

    Trying to collapse the entire list and not selected item.

    With Me.TV
            .SelectedItem.Expanded = Not .SelectedItem.Expanded
        End With

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,028

    Re: Collapse treeview list

    The simplest way would be to loop through all the nodes and set the Expanded property to false.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Collapse treeview list

    Thanks
    I will have to start reading on looping, not a clue now.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. how to create collapse and expand treeview in Excel 2010
    By awarebase1 in forum Excel General
    Replies: 4
    Last Post: 01-29-2013, 06:14 AM
  2. collapse pivot table field list by default
    By tlafferty in forum Excel General
    Replies: 3
    Last Post: 12-02-2011, 06:39 PM
  3. using a treeview
    By dadio25 in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 03-18-2009, 12:07 PM
  4. Replies: 2
    Last Post: 07-12-2006, 12:05 PM
  5. TreeView Image List
    By mark in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-12-2005, 12:06 PM

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