Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
hide/unhide
I am trying to create a macro that will work as follows. When a checkbox is
click, it will hide a number of cells on a different sheet. then when the check box is unchecked, it will unhide those cells. please help... |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
hide/unhide
Here's an example of a macro which hides/unhides rows/columns:
Sub TCAPSfcst() ' Hides rows 85:159 ' Hides columns AJ:CN ' Freezes window at H4 Cells.Select Range("B1").Activate Selection.EntireRow.Hidden = False Selection.EntireColumn.Hidden = False Rows("85:159").Select Selection.EntireRow.Hidden = True Columns("AJ:CN").Select Selection.EntireColumn.Hidden = True Range("H4").Select ActiveWindow.FreezePanes = False ActiveWindow.FreezePanes = True End Sub Post back if you have questions. Dave -- A hint to posters: Specific, detailed questions are more likely to be answered than questions that provide no detail about your problem. "brownti" wrote: I am trying to create a macro that will work as follows. When a checkbox is click, it will hide a number of cells on a different sheet. then when the check box is unchecked, it will unhide those cells. please help... |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
hide/unhide
thats only hiding, but doesnt make it return when i uncheck the box...thats
what i need it to do. thanks, Dave F wrote: Here's an example of a macro which hides/unhides rows/columns: Sub TCAPSfcst() ' Hides rows 85:159 ' Hides columns AJ:CN ' Freezes window at H4 Cells.Select Range("B1").Activate Selection.EntireRow.Hidden = False Selection.EntireColumn.Hidden = False Rows("85:159").Select Selection.EntireRow.Hidden = True Columns("AJ:CN").Select Selection.EntireColumn.Hidden = True Range("H4").Select ActiveWindow.FreezePanes = False ActiveWindow.FreezePanes = True End Sub Post back if you have questions. Dave I am trying to create a macro that will work as follows. When a checkbox is click, it will hide a number of cells on a different sheet. then when the check box is unchecked, it will unhide those cells. please help... |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
hide/unhide
To unhide set the argument to True, for example:
change Rows("85:159").Select Selection.EntireRow.Hidden = True to Rows("85:159").Select Selection.EntireRow.Hidden = False Personally, I would have this triggered by a button, not a check box. Have one button to hide what you want to hide and one button to unhide. -- A hint to posters: Specific, detailed questions are more likely to be answered than questions that provide no detail about your problem. "brownti" wrote: thats only hiding, but doesnt make it return when i uncheck the box...thats what i need it to do. thanks, Dave F wrote: Here's an example of a macro which hides/unhides rows/columns: Sub TCAPSfcst() ' Hides rows 85:159 ' Hides columns AJ:CN ' Freezes window at H4 Cells.Select Range("B1").Activate Selection.EntireRow.Hidden = False Selection.EntireColumn.Hidden = False Rows("85:159").Select Selection.EntireRow.Hidden = True Columns("AJ:CN").Select Selection.EntireColumn.Hidden = True Range("H4").Select ActiveWindow.FreezePanes = False ActiveWindow.FreezePanes = True End Sub Post back if you have questions. Dave I am trying to create a macro that will work as follows. When a checkbox is click, it will hide a number of cells on a different sheet. then when the check box is unchecked, it will unhide those cells. please help... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I set up a column tool to hide/unhide? | Excel Discussion (Misc queries) | |||
Hide/unhide with data below | Excel Discussion (Misc queries) | |||
hide/unhide macro | Excel Discussion (Misc queries) | |||
Conditional Hide/Unhide Rows | Excel Discussion (Misc queries) | |||
hide/unhide cells | Excel Worksheet Functions |