View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Rows to repeat at top Except for the last page

Hi

Try this one

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


--
Regards Ron de Bruin
http://www.rondebruin.nl


"nenzax" wrote in message ups.com...
Hi all,

I have a excel sheet with 3 sections and i have setup the "Row to
repeat at top" to a row in the pagesetup.

how do i go about removing the property(Row to repeat at top) in the
page where the second section ends progrmatticaly.

i dont want the rows headers appearing in all the pages.

Thanks
Nen