How to print 25 rows on each page in Excel

S

Suresh

Hi,

Can any body pl help me out

For suppose I have 1000 rows in my excel sheet.
My requirement is to get 25 rows in each page while
printing...

ie.,fixed no of rows in print sheets

How to set the page settings in excel 97...
or is there any programtically to do.....

Thanx in advance..

with regs
Suresh
 
J

J.E. McGimpsey

One way:

Public Sub try()
Dim i As Long
Dim hpb As HPageBreak
With ActiveSheet
For i = 26 To .UsedRange.Rows.Count Step 25
.HPageBreaks.Add .Cells(i, 1)
Next i
End With
End Sub
 

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