+ Reply to Thread
Results 1 to 3 of 3

Data Outlining (Collapse / Expand) - setting user restrictions

  1. #1
    Forum Contributor
    Join Date
    10-22-2012
    Location
    London, UK
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    162

    Data Outlining (Collapse / Expand) - setting user restrictions

    Hi all,

    Hoping for a bit of help in working with outlined data groups and how to deal with some hidden rows / columns.

    I understand there is no way of making rows or columns veryhidden (i.e. only interative with code).

    I have multiple groups of data that I would like to allow the user to expand and collapse individually as needed by clicking on the relevant '+' button (both grouped in rows and in columns).

    I would ideally like to prevent the user from being able to click on the '1', '2' (only two levels) and expand all / collapse all data and instead they would have to trigger code (via a custom menu) which would run the "...outline.showlevels..." code followed by some code to hide the Rows (1:6) and Columns (1) I don't want the user to see (I use text as code markers referenced in other subs).

    My problem is that I cannot find any way to prevent the use of the '1' and '2' and allow use of the '+'. Guessing this is not possible but would love to be proved wrong!

    So, instead I added code to the Worksheet Change event to hide the rows (1:6) and columns (1) when triggered - but the data outlining doesn't trigger the Worksheet Change event. Bum.

    Is there any other event I can use that would be triggered by the '1' and '2' but not kill the performance of the workbook?

    Or is there a far more elegant solution that I'm missing...

  2. #2
    Forum Contributor
    Join Date
    10-22-2012
    Location
    London, UK
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    162

    Re: Data Outlining (Collapse / Expand) - setting user restrictions

    Anyone got any ideas?

  3. #3
    Forum Contributor
    Join Date
    10-22-2012
    Location
    London, UK
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    162

    Re: Data Outlining (Collapse / Expand) - setting user restrictions

    Okay, well I found a way arround this myself. Not perfect but it works for what I need.

    I moved the hidden group of data (Rows 1:5) on to a separate worksheet - this acts like a template from which I copy and insert rows to the main sheet - retains formating, formulas and data grouping.
    With this removed when the code marker rows and columns are hidden AS THEY DO NOT FORM PART OF A DATA GROUPING - THEN THEY WILL REMAIN HIDDEN when Expand all (level 2) is clicked.

    Basically I learnt that you cannot hide a group of data and keep it hidden - far easier to move it to another worksheet.

    TC

+ 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. VBA to Expand/Collapse Row Groupings
    By Neverfail in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-09-2012, 07:03 AM
  2. Replies: 0
    Last Post: 04-18-2012, 01:41 PM
  3. Collapse and expand buttons
    By runnerpaul in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-06-2006, 07:33 AM
  4. Replies: 4
    Last Post: 06-14-2006, 07:45 PM
  5. Expand/Collapse Grouped Data in Protected Worksheet
    By Robert Slattery in forum Excel General
    Replies: 4
    Last Post: 11-08-2005, 03:10 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