View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave O
 
Posts: n/a
Default hide/unhide macro

The code that follows will unhide the row immediately above the active
cell. You can attach that to a button and place the button on row 5-
but will you need it in other places as well? Having a button for
every row that *might* be hidden would be chunky and ugly and tedious.
As an alternative you might freeze the sprdsht panes in such a way that
the upper left corner is always visible, and place the button there.

FYI This code contains a command that lands the cell pointer on column
A of the unhidden row- you can change or delete that as you like.

Sub Unhide_Row_Above()
Dim Roe As Long

Roe = ActiveCell.Offset(-1, 0).Row
Rows(Roe & ":" & Roe).Select
Selection.EntireRow.Hidden = False
Range("a" & Roe).Select
End Sub