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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top