+ Reply to Thread
Results 1 to 6 of 6

Need help trying to hide rows based on a checkbox in excel

  1. #1
    Registered User
    Join Date
    04-05-2013
    Location
    Harrison, NJ
    MS-Off Ver
    Excel 2007
    Posts
    3

    Need help trying to hide rows based on a checkbox in excel

    Hi,

    I have written some code in order to hide rows based on a checkbox. Initially I wrote the code to hide rows based on a value in a cell and it worked fine, however when i moved to a checkbox it did not work. I have pasted part of the code below.

    Please Login or Register  to view this content.
    Also the hide and unhide of rows never worked properly can someone please help.
    Last edited by jeffreybrown; 03-26-2020 at 02:20 PM. Reason: Please use code tags!

  2. #2
    Valued Forum Contributor Eastw00d's Avatar
    Join Date
    02-29-2020
    Location
    Breda, NL
    MS-Off Ver
    2016, 2019
    Posts
    833

    Re: Need help trying to hide rows based on a checkbox in excel

    Hi,
    I think you can have better results when you use instead:
    Please Login or Register  to view this content.
    Cheers
    Erwin
    I started learning VBA because I was lazy ...
    Still developing.... being more lazy...

  3. #3
    Forum Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,080

    Re: Need help trying to hide rows based on a checkbox in excel

    Hi & welcome to the board.
    Rather than checkboxes, which don't trigger a change event, why not just put an X in the cell instead?

  4. #4
    Registered User
    Join Date
    04-05-2013
    Location
    Harrison, NJ
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Need help trying to hide rows based on a checkbox in excel

    I tried using X as the trigger in a cell based on the checkbox =TRUE/FALSE and got mixed results. I think I need to work on a better VBA code.

  5. #5
    Registered User
    Join Date
    04-05-2013
    Location
    Harrison, NJ
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Need help trying to hide rows based on a checkbox in excel

    Quote Originally Posted by Eastw00d View Post
    Hi,
    I think you can have better results when you use instead:
    Please Login or Register  to view this content.
    Cheers
    Erwin
    Thanks so much I will try what you suggest and see how it works out.

  6. #6
    Valued Forum Contributor Eastw00d's Avatar
    Join Date
    02-29-2020
    Location
    Breda, NL
    MS-Off Ver
    2016, 2019
    Posts
    833

    Re: Need help trying to hide rows based on a checkbox in excel

    Maybe this is what you are looking for:
    Please Login or Register  to view this content.
    Cheers
    Erwin

+ 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. ActiveX Checkbox - Hide rows based on color
    By LSDSCS in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 01-23-2019, 02:41 PM
  2. Using a Checkbox to Hide Rows based on Cell Value
    By leedjc in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-25-2018, 03:45 AM
  3. Userform/checkbox hide/unhide rows based on cell value
    By MOHAMMESALMAN in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-03-2015, 03:17 AM
  4. Hide rows based on userform checkbox
    By rodrignj in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-21-2015, 05:38 AM
  5. [SOLVED] Macro to Automatically Hide/Unhide Rows Based on Checkbox
    By bga10s in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-27-2014, 07:32 PM
  6. Macro cannot hide rows based on cell linked to checkbox
    By fernaldd in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-04-2009, 11:46 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