Thread: hide/unhide
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave F Dave F is offline
external usenet poster
 
Posts: 2,574
Default 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...