Is there VBA code to hide all rows that are a certain color if a checkbox is checked?
Is there VBA code to hide all rows that are a certain color if a checkbox is checked?
And something more about it ?
An example ?
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
excel.PNG
does this help?
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
Click the * Add Reputation below to say thanks.
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?
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.
view your post in mrexcel
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks