+ Reply to Thread
Results 1 to 5 of 5

Custom Click box to hide or unhide sheets

  1. #1
    Registered User
    Join Date
    01-05-2023
    Location
    Dallas,Texas
    MS-Off Ver
    MS 365
    Posts
    2

    Custom Click box to hide or unhide sheets

    So I am just starting this project and realized I have no idea what i am doing when it comes to macros and would like some help if you do not mind.
    I have the following code I was able to play with but have no idea how to include the code for if it is clicked then show the sheet if not clicked then hide the sheet.
    Any type of help would be very helpful please! Thank you in advance for your time and knowledge.

    Please Login or Register  to view this content.

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Custom Click box to hide or unhide sheets

    The problem you will have even if you get it working right is that it will only work an the visible sheet because once it's hidden the button is hidden too.
    I would suggest a macro that is placed in the QAT ribbon that will work on the active sheet.
    The problem is that when a sheet is not visible you cannot activate it so you will have to work with a list of worksheets present in the file
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Registered User
    Join Date
    01-05-2023
    Location
    Dallas,Texas
    MS-Off Ver
    MS 365
    Posts
    2

    Re: Custom Click box to hide or unhide sheets

    I have like 15 sheets on the spreadsheet and the first two would never go away. I just a few others to not be shown until the button is clicked. Then if they unclick the button make it hidden again. I am not worried about if it is not visible there will not be a button on the sheets that are going to be toggled with this button.

  4. #4
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Custom Click box to hide or unhide sheets

    You probably misunderstood my answer:
    First, always one sheet MUST be visible in Excel.
    You cannot address a button on a hidden sheet to undihe it so you will need a picklist to search the hidden worksheet to unhide it.
    One the sheet is visible you can (if there is a button on it) click it to hide it.
    What is the criteria to unhide a sheet? A username?

  5. #5
    Forum Expert
    Join Date
    07-23-2018
    Location
    UK
    MS-Off Ver
    365 32bit Win
    Posts
    1,935

    Re: Custom Click box to hide or unhide sheets

    there will not be a button on the sheets that are going to be toggled with this button
    Probably something like this


    Please Login or Register  to view this content.

+ 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. [SOLVED] Hide or Unhide the Row Below when you click the Cell
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-06-2019, 11:17 AM
  2. How To Hide/Unhide sheets based on a button click
    By m2som in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-14-2017, 07:54 PM
  3. [SOLVED] Hide unhide a row with one click
    By SHELTONUNDERDOG in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-26-2015, 04:45 PM
  4. Double click to hide/unhide rows
    By Lilleyj in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 07-15-2014, 10:55 AM
  5. [SOLVED] Hide And Unhide Column With One Button,,,,Once Click Hide,,,,,Again Click Unhide
    By HaroonSid in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-11-2014, 07:58 AM
  6. [SOLVED] need to hide / unhide cells with single click
    By SBURTON in forum Excel General
    Replies: 2
    Last Post: 09-25-2012, 03:00 PM
  7. click - hide/unhide column
    By sqoo in forum Excel General
    Replies: 7
    Last Post: 11-28-2011, 04:48 PM

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