Complete Macro


Posted by Alpha on June 13, 2001 11:05 AM

I am trying to input the proper code into the macro listed below to make it all fit on one page:

Sub PRNCONTM()

Sheets("ASSUMPTIONS").Select
ActiveSheet.PageSetup.PrintArea = "A1:R37"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End Sub

What am I missing? Thanks in advance!



Posted by Tom Morales on June 13, 2001 11:22 AM

Alpha - Try...

With ActiveSheet.PageSetup
.PrintArea = "A1:R37"
.FitToPagesWide = 1
.FitToPagesTall = 1
End With

In general, when you're doing something simple like a page set-up, it's easy to record a the steps, and edit the results to your whims. I can never remember the VBA details of these features, and recording a few steps is an instant no-brainer means of retrieving the correct code and syntax.
Tom