+ Reply to Thread
Results 1 to 6 of 6

Display Hidden Sheet(s) based on cell value

  1. #1
    Registered User
    Join Date
    10-29-2014
    Location
    Chattanooga TN
    MS-Off Ver
    2010
    Posts
    2

    Display Hidden Sheet(s) based on cell value

    Hello & thank you for this forum.
    I have a workbook that contains multiple worksheets. I have an overview form which displays specific data concerning parts. Some parts need to be documented via "form1" (sheet2) & some parts need to be documented by "form2" (sheets 3 & 4). I have added a document via field to display which form should be used & would like to incorporate some code that would hide all sheets except for the sheets corresponding to the apropriate form. My overview form uses vlookup. My workbook is password protected to preclude users from altering master data or formulas. Thanks in advance for your expertise.

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Display Hidden Sheet(s) based on cell value

    Something like:
    Please Login or Register  to view this content.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Valued Forum Contributor Kamboj's Avatar
    Join Date
    09-25-2014
    Location
    India
    MS-Off Ver
    2003 - 2010
    Posts
    430

    Re: Display Hidden Sheet(s) based on cell value

    use visible command to hide or display sheets

    Sheets("Sheet1").Visible = False ' hide
    Sheets("Sheet1").Visible = True ' display

  4. #4
    Valued Forum Contributor Kamboj's Avatar
    Join Date
    09-25-2014
    Location
    India
    MS-Off Ver
    2003 - 2010
    Posts
    430

    Re: Display Hidden Sheet(s) based on cell value

    use visible command to hide or display sheets

    Sheets("Sheet1").Visible = False ' hide
    Sheets("Sheet1").Visible = True ' display

  5. #5
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Display Hidden Sheet(s) based on cell value

    Welcome to the forum.

    Normally, I set worksheet protection in the Open event of the ThisWorkbook object.

    Change the password "ken" and the sheets to leave visible to suit.
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    10-29-2014
    Location
    Chattanooga TN
    MS-Off Ver
    2010
    Posts
    2

    Re: Display Hidden Sheet(s) based on cell value

    Olly,

    This worked like a champ! Thank you. Sorry it took so long to respond. Thought I had responded immediately. Thanks again.

+ 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. Replies: 4
    Last Post: 09-19-2014, 08:10 AM
  2. [SOLVED] Display data from sheets based on value in a cell on main sheet.. Help!
    By cpyter in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-29-2014, 02:20 PM
  3. Replies: 1
    Last Post: 02-13-2014, 04:45 PM
  4. Formula based on hidden cell
    By graiggoriz in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-12-2013, 04:12 PM
  5. to make a certain Excel sheet visible/hidden, based on the value of a cell.
    By unique_loy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-12-2011, 11:50 AM

Tags for this Thread

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