use checkbox to hide rows

S

ScottB

I have set up a macro to unhide 5 rows on a worksheet and have also set up
another one to unhide the same 5 rows. I have set up a checkbox and have been
able to use VB editor to run the 'hide' macro when the box is checked - how
do I use VB to unhide the rows when the box is unchecked?
 
B

Bob Phillips

In the macro, test the value and hide/unhide accordingly.

Rows("5:10").Hidden = ActiveSheet.CheckBoxes(Application.Caller).Value =
1
 
B

Bob Phillips

In the macro, test the value and hide/unhide accordingly.

Rows("5:10").Hidden = _
ActiveSheet.CheckBoxes(Application.Caller).Value = 1
 
Top