Hello,
I wrote this code but when I print it prints one range in a page and next range in another page on printer.
Can you help me coorect the code to print all 2 ranges in only one page?
Thanks for your time.
Sub CustomPA()
Dim ws As Worksheet
Dim yRng1 As Range
Set ws = ThisWorkbook.Sheets("POS")
wslR = ws.Cells(Rows.Count, 6).End(xlUp).Row
wsLC = ws.Cells(1, Columns.Count).End(xlToLeft).Column
Set yRng1 = Sheets("pos").Range("k19:m24")
Set printA = ws.Range("f2:h" & wslR)
With ActiveSheet.PageSetup
.PrintArea = printA.Address(0, 0) & "," & yRng1.Address
ActiveWindow.SelectedSheets.PrintOut
End With
Range("F2").Select
End Sub