+ Reply to Thread
Results 1 to 10 of 10

ActiveX Checkbox - Hide rows based on color

  1. #1
    Registered User
    Join Date
    01-17-2019
    Location
    Los Angeles, CA
    MS-Off Ver
    1704
    Posts
    4

    ActiveX Checkbox - Hide rows based on color

    Is there VBA code to hide all rows that are a certain color if a checkbox is checked?

  2. #2
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,150

    Re: ActiveX Checkbox - Hide rows based on color

    And something more about it ?
    An example ?

  3. #3
    Registered User
    Join Date
    01-17-2019
    Location
    Los Angeles, CA
    MS-Off Ver
    1704
    Posts
    4

    Re: ActiveX Checkbox - Hide rows based on color

    Not sure what you mean...

    I already have the checkboxes able to hide certain rows with a simple code. But I want to connect it to hide rows based on color rather than the row # so that if all the same colored rows are not right next to each other, the code will still hide them when checked. This is the simple code I am using now for row number

    Private Sub CheckBox2_Click()
    [7:9].EntireRow.Hidden = Not CheckBox2
    End Sub

  4. #4
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,150

    Re: ActiveX Checkbox - Hide rows based on color

    Quote Originally Posted by LSDSCS View Post
    ... Not sure what you mean ...
    Sample workbook with a sheet of/with "colored rows", please ...

  5. #5
    Registered User
    Join Date
    01-17-2019
    Location
    Los Angeles, CA
    MS-Off Ver
    1704
    Posts
    4

    Re: ActiveX Checkbox - Hide rows based on color

    excel.PNG

    does this help?

  6. #6
    Valued Forum Contributor dotchiejack's Avatar
    Join Date
    05-21-2015
    Location
    Antwerp,Belgium
    MS-Off Ver
    2016
    Posts
    507

    Re: ActiveX Checkbox - Hide rows based on color

    LSDSCS,
    If you have an excel question then you should post an excel example, not a picture.
    pictures are for a photoshop forum.
    Because you are new, I made an example.
    Next time no way.
    Here you can find color info.
    http://dmcritchie.mvps.org/excel/colors.htm
    Attached Files Attached Files
    Click the * Add Reputation below to say thanks.

  7. #7
    Registered User
    Join Date
    01-17-2019
    Location
    Los Angeles, CA
    MS-Off Ver
    1704
    Posts
    4

    Re: ActiveX Checkbox - Hide rows based on color

    Thank you very much. That is very helpful!

    To clarify, I am trying to get the rows to APPEAR when the box is CHECKED and then HIDE when UNchecked, and be able to go back and forth between checking/unchecking and have them hide/appear.

    Does that make sense?

  8. #8
    Valued Forum Contributor dotchiejack's Avatar
    Join Date
    05-21-2015
    Location
    Antwerp,Belgium
    MS-Off Ver
    2016
    Posts
    507

    Re: ActiveX Checkbox - Hide rows based on color

    Code for the first checkbox (yellow)
    Please Login or Register  to view this content.
    Last edited by dotchiejack; 01-18-2019 at 03:03 PM.

  9. #9
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,150

    Re: ActiveX Checkbox - Hide rows based on color

    Quote Originally Posted by LSDSCS View Post
    ... does this help?
    Would you like the answer to your question in the form of an image also ?

  10. #10
    Registered User
    Join Date
    11-03-2012
    Location
    México
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: ActiveX Checkbox - Hide rows based on color

    view your post in mrexcel

    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. 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
  2. Hide rows based on userform checkbox
    By rodrignj in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-21-2015, 05:38 AM
  3. [SOLVED] Use VBA to change worksheet tab color based on ActiveX checkbox values
    By penny in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-19-2015, 02:12 PM
  4. Do I have to write a seperate code for each ActiveX checkbox to hide rows?
    By Angelammarten in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 11-20-2014, 04:55 PM
  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. Hide ActiveX Checkbox on worksheet
    By ker9 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-13-2011, 04:46 PM

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