G
Graham Haughs
I am pulling what is left of my hair out with this one. The Procedure below
is set up to print out a dynamic range which it does fine but it refuses to
restict the size to one page wide. I have an almost identical procedure
elsewhere and it works fine and I have copied it and just changed the named
print area but it still refuses to do it. Any help would be most
appreciated.
Sub printpkmanureplanner()
If Range("a5").Value = "" Then
MsgBox "There are no fields to print. Operation cancelled",
vbInformation, "Print Cancelled"
Exit Sub
End If
ActiveSheet.PageSetup.PrintArea = "AAPKPlannedCrops"
With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$4"
.Orientation = xlLandscape
.PaperSize = xlPaperA4
.FitToPagesWide = 1
.FitToPagesTall = 20
.LeftFooter = "&F"
End With
ActiveWindow.SelectedSheets.PrintOut
End Sub
Graham Haughs
Turriff
Scotland
is set up to print out a dynamic range which it does fine but it refuses to
restict the size to one page wide. I have an almost identical procedure
elsewhere and it works fine and I have copied it and just changed the named
print area but it still refuses to do it. Any help would be most
appreciated.
Sub printpkmanureplanner()
If Range("a5").Value = "" Then
MsgBox "There are no fields to print. Operation cancelled",
vbInformation, "Print Cancelled"
Exit Sub
End If
ActiveSheet.PageSetup.PrintArea = "AAPKPlannedCrops"
With ActiveSheet.PageSetup
.PrintTitleRows = "$1:$4"
.Orientation = xlLandscape
.PaperSize = xlPaperA4
.FitToPagesWide = 1
.FitToPagesTall = 20
.LeftFooter = "&F"
End With
ActiveWindow.SelectedSheets.PrintOut
End Sub
Graham Haughs
Turriff
Scotland