Excel Spreadsheet "Rows to repeat at top"

S

Sandie

Excel 2002
Is there a way to set "Rows to repeat at top" (a page
setup function) to only repeat on specific pages of a
spreadsheet? E.G., can you 'turn it off' at a certain
point in the spreadsheet if you wish?

Thanks!
 
R

Ron de Bruin

Hi Sandie

Only with Macro you can do this
If you want a example post back and I will answer
you when I get back from Bowling.
 
R

Ron de Bruin

Hi Sandie

This example will not print row 1 and 2 on the last page for example

Sub test()
Totpage = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)")
With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$2"
ActiveSheet.PrintOut From:=1, To:=Totpage - 1
.PrintTitleRows = ""
ActiveSheet.PrintOut From:=Totpage, To:=Totpage
End With
End Sub
 
S

Sandie

GREAT!! Thanks so much for your quick response. I wish I
had thought to post this question here BEFORE I spent so
much time trying to figure it out on my own.

I really appreciate your help, Ron!
-----Original Message-----
Hi Sandie

This example will not print row 1 and 2 on the last page for example

Sub test()
Totpage = Application.ExecuteExcel4Macro("GET.DOCUMENT (50)")
With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$2"
ActiveSheet.PrintOut From:=1, To:=Totpage - 1
.PrintTitleRows = ""
ActiveSheet.PrintOut From:=Totpage, To:=Totpage
End With
End Sub


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


"Sandie" <[email protected]> wrote in
message news:[email protected]...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top