ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   use checkbox to hide rows (https://www.excelbanter.com/excel-discussion-misc-queries/199481-use-checkbox-hide-rows.html)

ScottB

use checkbox to hide rows
 
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?

Bob Phillips[_3_]

use checkbox to hide rows
 
In the macro, test the value and hide/unhide accordingly.

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


--
__________________________________
HTH

Bob

"ScottB" wrote in message
...
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?




Bob Phillips[_3_]

use checkbox to hide rows
 
In the macro, test the value and hide/unhide accordingly.

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


--
__________________________________
HTH

Bob

"ScottB" wrote in message
...
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?






All times are GMT +1. The time now is 07:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com