MrExcel Publishing
Your One Stop for Excel Tips & Solutions

I lose my page breaks when I write a Macro to print a report


Posted by Marion on January 23, 2002 5:26 PM

This should be so easy.
I'm familiar with Quattro.
I'm trying to write some quick Excel macros on the fly.

This macros defines the print settings, but each time, it loses
my page breaks.

Any ideas?

Thanks -


Posted by Kev Tweddle on January 24, 2002 6:22 AM

Hi Marion.

You could try this:

Private Sub Pagesetup()

With Worksheets("<Name of Worksheet>").PageSetup
.Zoom = 48
.FitToPagesWide = 1
.FitToPagesTall = 1
End With

End Sub

By adjusting the zoom value you can fit the data onto one page. Good luck.

let me know if it helped.

Kev.

Posted by Kev Tweddle on January 24, 2002 6:22 AM

Hi Marion.

You could try this:

Private Sub Pagesetup()

With Worksheets("Name of Worksheet").PageSetup
.Zoom = 48
.FitToPagesWide = 1
.FitToPagesTall = 1
End With

End Sub

By adjusting the zoom value you can fit the data onto one page. Good luck.

let me know if it helped.

Kev.