D
DavidJ726
Using the macro recorder, I made the following macro to hide several rows,
prints the spreadsheet as previously defined by the print area, and then
unhides the rows and selects cell A1. I then made it available on the menu
bar (forgot how I did that) but now, whenever I use the macro, as well as
running on the open spreadsheet, it opens up the spreadsheet that (I think)
I used to record it from. Why does it do that, and how do I keep it from
opening that worksheet?
Here's what it looks like;
Sub HideRows()
'
' HideRows Macro
' Macro recorded 8/29/2004 by David
'
'
Rows("7:70").Select
Selection.EntireRow.Hidden = True
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Rows("6:71").Select
Selection.EntireRow.Hidden = False
Range("A1").Select
End Sub
Thanks,
David...
prints the spreadsheet as previously defined by the print area, and then
unhides the rows and selects cell A1. I then made it available on the menu
bar (forgot how I did that) but now, whenever I use the macro, as well as
running on the open spreadsheet, it opens up the spreadsheet that (I think)
I used to record it from. Why does it do that, and how do I keep it from
opening that worksheet?
Here's what it looks like;
Sub HideRows()
'
' HideRows Macro
' Macro recorded 8/29/2004 by David
'
'
Rows("7:70").Select
Selection.EntireRow.Hidden = True
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Rows("6:71").Select
Selection.EntireRow.Hidden = False
Range("A1").Select
End Sub
Thanks,
David...