+ Reply to Thread
Results 1 to 6 of 6

Hide Unhide specific sheets with cell value

  1. #1
    Registered User
    Join Date
    05-01-2009
    Location
    Nashville, TN
    MS-Off Ver
    2010
    Posts
    3

    Hide Unhide specific sheets with cell value

    Hello, I am trying to hide/unhide sheets based on whether or not there is text in specific cells. I can get the first command to work, but cannot get the remaining statements to execute. Here is a sample of the first 3 [out of 40 statements] from my code:
    Please Login or Register  to view this content.
    Thank you,
    Aaron

  2. #2
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    MS365 V.2406
    Posts
    2,318

    Re: Hide Unhide specific sheets with cell value

    I think you may have more success with just one change sub and using a Select Case statement...

  3. #3
    Registered User
    Join Date
    05-01-2009
    Location
    Nashville, TN
    MS-Off Ver
    2010
    Posts
    3

    Re: Hide Unhide specific sheets with cell value

    Thank you for the reply. I am a novice at VBA. Am I on the right track here? And if so, how do I get it to continue to the next hide/unhide based on contents of next cell/range in the same sheet?
    Please Login or Register  to view this content.
    Last edited by aksnave; 03-23-2012 at 06:12 PM. Reason: missing ')'

  4. #4
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    MS365 V.2406
    Posts
    2,318

    Re: Hide Unhide specific sheets with cell value

    Select case may not be the best way. Try adapting this...
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-01-2009
    Location
    Nashville, TN
    MS-Off Ver
    2010
    Posts
    3

    Re: Hide Unhide specific sheets with cell value

    Thank you dangelor...that is super clean! I adjusted it to below so the sheet is hidden if cell is empty and it works fantastic!
    Please Login or Register  to view this content.

  6. #6
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    MS365 V.2406
    Posts
    2,318

    Re: Hide Unhide specific sheets with cell value

    Glad it works for you!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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