I have a checkbox that I am trying to use to hide and unhide rows. The rows start off hidden, and the aim is to have the rows revealed when the checkbox is checked and then hidden again if the checkbox is unchecked. The code I am using is below. Rather than unhiding and hiding the rows as I'd like, the code does nothing. When I switch the spots of the "1" and "0" as seen below, it will unhide the rows when the checkbox is checked, but it won't re-hide the cells when it is unchecked.
Code that does nothing:
Code that unhides but does not re-hide rows:
What am I missing/doing wrong with the macro to get it to perform as I'd like?
Bookmarks