How do I repeat specific rows on some pages and then change for ot

W

Worker Bee

How do I repeat a specific row for 18 pages and then change the repeating row
for
7 other pages in the same worksheet?
 
G

Gord Dibben

Two print jobs.

You can do it with VBA but it would still be two print jobs.

Example VBA.............revised Ron de Bruin code.

Sub Print_Titles()
Dim TotPages As Long
TotPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)")
With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$1"
.PrintTitleColumns = ""
End With
ActiveSheet.PrintOut From:=1, To:=18 'first print job
With ActiveSheet.PageSetup
.PrintTitleRows = "$3:$3"
.PrintTitleColumns = ""
End With
ActiveSheet.PrintOut From:=19, To:=TotPages 'second print job
End With
End Sub


Gord Dibben MS Excel MVP


On Tue, 19 May 2009 15:07:01 -0700, Worker Bee <Worker
 
G

Gord Dibben

Two print jobs.

You can do it with VBA but it would still be two print jobs.

Example VBA.............revised Ron de Bruin code.

Sub Print_Titles()
Dim TotPages As Long
TotPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)")
With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$1"
.PrintTitleColumns = ""
End With
ActiveSheet.PrintOut From:=1, To:=18 'first print job
With ActiveSheet.PageSetup
.PrintTitleRows = "$3:$3"
.PrintTitleColumns = ""
End With
ActiveSheet.PrintOut From:=19, To:=TotPages 'second print job
End With
End Sub


Gord Dibben MS Excel MVP


On Tue, 19 May 2009 15:07:01 -0700, Worker Bee <Worker
 

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