Help Reg Print

A

Aligahk06

Dear All,

I am printing total more than 50 pages.For each page rows to repeat at top
are row 1 to row10.
rOWS 8 there is a title called Control #.
i.e I mean for page number 1 to 2 Control # is 1 ,page number 3 to 4 Control
# is 2
and so on.
Can i have any techniques that automatically change the control # 1 for
print page 1 to 2
control # 2 for print page 3 to 4 and so on.

I want its done automatically once i give the print command for the entire
page.

Hope u understand my query?

Please assist ?

Rgds,

Alighak06
 
D

Dave Peterson

Ron de Bruin has lots of printing tips here:
http://www.rondebruin.nl/print.htm#not

That page is how to print a header on only the first sheet.

But you could modify the code so that it prints in pairs of sheets and changes
the header for each printing.

Option Explicit
Sub testme()
Dim TotPages As Long
Dim iCtr As Long
TotPages = Application.ExecuteExcel4Macro("GET.DOCUMENT(50)")

For iCtr = 1 To TotPages Step 2
With Worksheets("Sheet1")
.PageSetup.RightHeader = "Your Header info"
.PageSetup.CenterHeader = "Control: " & (iCtr + 1) / 2
.PageSetup.RightHeader = ""
.PrintOut preview:=True, From:=iCtr, To:=iCtr + 1
End With
Next iCtr
End Sub

(I used preview:=true to save trees while testing.)

If you're printing to a network printer and you have banner pages, expect a
banner page for each print job.
 

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