I need to Print the data in a named range and have tried the following code to do this:-
Sub PagePr(RName As String, NewYr)
Sheets("ManagementAccounts_" & NewYr).Activate
With ActiveSheet.PageSetup
.PrintArea = Range(RName).Address
.Orientation = xlLandscape
.PaperSize = xlPaperA4
.FitToPagesWide = 1
.FitToPagesTall = 1
.Zoom = False
End With
'Application.PrintCommunication = True
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
IgnorePrintAreas:=False
End Sub
When this is run the correct columns are printed but the first printed row is the row above the named range and the last printed row is the penultimate row of the named range.
When I check the range in the Name Manager I find that the named range has been changed and its value is that of the print area.
There are 67 rows to print and 20 columns most of which contain 6 digits so this is a squeeze on A4 whether Portrait or Landscape and perhaps something decides that's too much to print we have to trim it.
But how can the range values be changed? I need help please!
John
Bookmarks