View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Rows to repeat at top of each page

Sub Test()
Dim TotPages As Long
TotPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)")
With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$1"
ActiveSheet.PrintOut From:=1, To:=TotPages - 1
.PrintTitleRows = ""
ActiveSheet.PrintOut From:=TotPages, To:=TotPages
End With
End Sub

Credit an assist to Ron de Bruin

http://www.rondebruin.nl/print.htm#not


Gord Dibben MS Excel MVP

On Wed, 31 Oct 2007 04:16:02 -0700, Jane wrote:

I have created an Excel spreadsheet with the rows repeating at the top of
each page. I do not want these rows to repeat on the final page but I also
do not want the last page to be a separate sheet. Is this possible?