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 hiding cells then a button to get them back up again?

You need VBA code.

Here is an example of such code. You will need to change the cell
references below to suit your needs.

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

This macro is then associated with a button. Post back if you have questions.
--
Brevity is the soul of wit.


" wrote:

how do i hide a selection of cells and then have a button to bring them
back up again? as in an action button that says "SHOW" and when you
click it, the cells you've hidden will show up. many thanks