+ Reply to Thread
Results 1 to 7 of 7

Hide sheets based on condition

  1. #1
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,689

    Hide sheets based on condition

    Hi,

    I have a user sheet in which the user can select a region (North, East, South and West).

    Based upon the selection I need a macro which will hide all the other sheets other than the users selection. E.g. If the user selects “North” then all the sheets with “North” Cell A1 will remain visable.

    Can this be done?
    Attached Files Attached Files

  2. #2
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Hide sheets based on condition

    Hi, pauldaddyadams,

    maybe like this.

    Into ThisWorkbook:
    Please Login or Register  to view this content.
    Behind Sheet1:
    Please Login or Register  to view this content.
    In a standard module;
    Please Login or Register  to view this content.
    Ciao,
    Holger
    Attached Files Attached Files
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  3. #3
    Valued Forum Contributor
    Join Date
    02-09-2012
    Location
    Mauritius
    MS-Off Ver
    Excel 2007
    Posts
    1,055

    Re: Hide sheets based on condition

    Hi.

    You can try this too:

    Example.xlsm
    Click *, if my suggestion helps you. Have a good day!!

  4. #4
    Forum Contributor
    Join Date
    12-31-2012
    Location
    Jhang, Pakistan
    MS-Off Ver
    Excel 2010
    Posts
    250

    Re: Hide sheets based on condition

    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,689

    Re: Hide sheets based on condition

    Hi,

    I need to access the sheets however they are hidden - is there a macro that will unhide all?

    Also, what part of the code is telling excel to look at cell A1 on each of the individual sheets as I may need to change this cell

  6. #6
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Hide sheets based on condition

    Hi, pauldaddyadams,

    any changes can be made by VBA to sheets which are very hidden.

    Please Login or Register  to view this content.
    Ciao,
    Holger

  7. #7
    Valued Forum Contributor
    Join Date
    04-21-2005
    Location
    Southern England
    MS-Off Ver
    Excel for Office 365
    Posts
    1,689

    Re: Hide sheets based on condition

    Wow - so many helpful replys!!

    Thank you all! I have managed to get this to work!

+ 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