View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Macro help needed

Guessing here but if you want to unhide the last row and hide 2 rows above

sub unhide row()
lr=cells(rows.count,"a").end(xlup).row
rows(lr).hidden=false
rows(lr-2).hidden=true
end sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"James" wrote in message
...
I am looking to set up a macro to unhide a new row every time a button is
clicked.

I have set up a macro that opens up a new row, but it doesn't add any rows
after that.

Private Sub CommandButton1_Click()
'
' Add_New_Project Macro
' Macro recorded 22/02/2008 by
'
'
ActiveWindow.SmallScroll Down:=5
ActiveSheet.Shapes("CommandButton1").Select
ActiveWindow.SmallScroll Down:=-75
Rows("2:99").Select
Range("A99").Activate
Selection.EntireRow.Hidden = False
Rows("3:97").Select
Range("A97").Activate
Selection.EntireRow.Hidden = True
End Sub

Could anyone help with this?
--
J