Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
Macro help needed | Excel Discussion (Misc queries) | |||
Macro needed | Excel Worksheet Functions | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) | |||
Macro needed to Paste Values and prevent Macro operation | Excel Discussion (Misc queries) |