Results 1 to 7 of 7

Using conditions to show/hide worksheets

Threaded View

Centara Using conditions to show/hide... 02-25-2009, 12:39 AM
JBeaucaire Re: Trying to use conditions... 02-25-2009, 02:10 AM
Centara Re: Trying to use conditions... 02-25-2009, 02:21 AM
Centara Re: Trying to use conditions... 03-01-2009, 09:27 PM
JBeaucaire re: Using conditions to... 03-02-2009, 02:51 AM
JBeaucaire re: Using conditions to... 03-02-2009, 04:28 AM
Centara re: Using conditions to... 03-02-2009, 02:24 PM
  1. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    re: Using conditions to show/hide worksheets

    You know, I looked at your sheet and noticed you have THREE cells with Majors in them and I can just guess your next question will be how to keep all of them and have their own sheets appear/disappear as choices are made. That's an entirely different approach than the one we've used so far.

    Here's an updated sheet with the new approach. I left the Data Drop Menu Input sheet visible so you can see the changes.

    Instead of Worksheet_Change on Student Information, we're going to use Worksheet_Calculate on the Data Drop Menu Input. Every time this sheet changes the other sheets will hide and unhide. Now why would this sheet change? Look at the stuff I've added.

    First, I've added a second section of Majors that "shrinks" as choices are made on the main sheet. This second list is what is actually being used in your Data Validation on the main sheet. So when you select "Accounting", the option disappears from the drop down for the next choice. Pretty cool.

    This is being done with the "Key" column I added. As choices are made, they lose their key in the index. This causes the second list to reorder and since this happens in formulas, the RAND() formula in cell G1 creates an actual "change" in the sheet and THAT triggers the new macro to hide and unhide sheets.

    In effect the new macro unhides sheets that have lost their index value in the "Key" section. If there is a number there, the sheets stay hidden.

    Anyway, it works. You can now make choices on the main sheet all you want and the sheets will hide/unhide.
    Attached Files Attached Files

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