ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Rows to repeat at top Except for the last page (https://www.excelbanter.com/excel-programming/351333-rows-repeat-top-except-last-page.html)

nenzax

Rows to repeat at top Except for the last page
 
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


Ron de Bruin

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





All times are GMT +1. The time now is 05:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com