Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
I can record a macro to hide or unhide columns or cells but I need to
reverse the process when the button toggles to the other position. I need the cells to be hidden until the box is "checked" but hide if it gets unchecked. Marc |
#2
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
Hi Marc,
Try this: Placed a check box on excel and paste this code below: Private Sub CheckBox1_Click() Range("A1").Select 'Active Cell Select If CheckBox1.Value = True Then Selection.EntireRow.Hidden = True Else: CheckBox1.Value = False Selection.EntireRow.Hidden = False End If End Sub Hope this helps. "Marc" wrote: I can record a macro to hide or unhide columns or cells but I need to reverse the process when the button toggles to the other position. I need the cells to be hidden until the box is "checked" but hide if it gets unchecked. Marc |
#3
![]()
Posted to microsoft.public.excel.newusers
|
|||
|
|||
![]()
Mel thanks! It dawned on me after I sent the post if I used the check boxes
from the "Forms" not the "Control Toolbox" I could get a true false and use that to make the changes but yours is more elegant. Marc "Mel Arquiza" wrote in message ... Hi Marc, Try this: Placed a check box on excel and paste this code below: Private Sub CheckBox1_Click() Range("A1").Select 'Active Cell Select If CheckBox1.Value = True Then Selection.EntireRow.Hidden = True Else: CheckBox1.Value = False Selection.EntireRow.Hidden = False End If End Sub Hope this helps. "Marc" wrote: I can record a macro to hide or unhide columns or cells but I need to reverse the process when the button toggles to the other position. I need the cells to be hidden until the box is "checked" but hide if it gets unchecked. Marc |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macros and Toolbars | Excel Discussion (Misc queries) | |||
Check Boxes | Excel Discussion (Misc queries) | |||
Check Box Printing | Excel Discussion (Misc queries) | |||
Macros to delete check boxes | Excel Discussion (Misc queries) | |||
Creating a check box that does not require security clearance. | Excel Worksheet Functions |