+ Reply to Thread
Results 1 to 14 of 14

Hide all worksheet tab until selected

  1. #1
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Hide all worksheet tab until selected

    Can I hide all worksheet tabs and when worksheet is selected from listbox that sheet tab is visible?
    Last edited by zplugger; 03-27-2015 at 10:20 PM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,596

    Re: Hide all worksheet tab until selected

    When opening workbook close all sheets (I've put also example if you don't want to hide some sheet):

    Please Login or Register  to view this content.
    And then when click on listbox just unhide it:

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Hide all worksheet tab until selected

    First part works Great, can not get it to go to sheet when selected from listbox1

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,596

    Re: Hide all worksheet tab until selected

    Setting should be dependant on listbox

    Please Login or Register  to view this content.
    but would need example to work with it.

  5. #5
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Hide all worksheet tab until selected

    Here it is, if you have time.One problem I'm having is my sort will not work with hidden sheets.
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Hide all worksheet tab until selected

    Got this far, but when another list item is selected it should hide current sheet and unhide new item.

    Please Login or Register  to view this content.

  7. #7
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,596

    Re: Hide all worksheet tab until selected

    Didn't yet see your file but based on your code try to create macro from above:

    Please Login or Register  to view this content.
    Then call it when opening sheet:

    Please Login or Register  to view this content.
    But also each time you run macro:

    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Hide all worksheet tab until selected

    File in #5
    Code does unhide sheet but leaves it unhidden when another sheet is selected.
    Last edited by zplugger; 03-27-2015 at 04:34 PM.

  9. #9
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,596

    Re: Hide all worksheet tab until selected

    Here, I've copy above codes for you.

    Since (at least) one sheet must always be visible I've use Sheet1 for that.
    Attached Files Attached Files

  10. #10
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Hide all worksheet tab until selected

    I See, I was putting Sub Hide Sheets in wrong,Thank you for showing me. Is there a way around sorting the sheets now or will I just
    unhide all before sort. Not sure what is best way.

    Please Login or Register  to view this content.

  11. #11
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,596

    Re: Hide all worksheet tab until selected

    You need to sort them only once right?
    Since after that they will always be sorted.
    You can do that too on workbook open

  12. #12
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Hide all worksheet tab until selected

    Thanks for all your help zbor, tried the sort code in workbook open before hiding sheets with no luck.Just added a button to
    userform to unhide and sort.

  13. #13
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,596

    Re: Hide all worksheet tab until selected

    Try replace Worksheet open with this:
    Please Login or Register  to view this content.
    If you want to sort them each time then you can put upper part of the code within Hide_sheets macro.

  14. #14
    Forum Contributor
    Join Date
    03-05-2009
    Location
    usa
    MS-Off Ver
    Excel 2016 32Bit
    Posts
    1,173

    Re: Hide all worksheet tab until selected

    Thanks for the Code work zbor, what a nice surprise. Again Thank You for helping.

+ 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 code for selected selected pages in one worksheet
    By mehmetics in forum Excel General
    Replies: 0
    Last Post: 11-06-2014, 02:41 PM
  2. Hide all worksheet except 5 input sheets and a 6th sheet selected in a drop down list
    By brianfarrell06 in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 01-15-2014, 10:21 AM
  3. Hide Selected columns
    By vin2122 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-19-2012, 02:22 AM
  4. Hide worksheet and show only when selected
    By famico78 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-28-2009, 06:51 AM
  5. How Can I Hide Selected Sheets?
    By modytrane in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-28-2008, 11:38 AM

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