-
Print Visible data rows
The following code is designed to print only the visible rows. But the code sets print area to individual visible rows.
[vba]Sub PrintDialogByChangingNumber()
Application.ScreenUpdating = False
Dim LR As Long
LR = Range("D" & Rows.Count).End(xlUp).Row
With ActiveSheet.PageSetup
.Orientation = xlLandscape
.FitToPagesWide = 1
.FitToPagesTall = 1
.PrintArea = Range("D3:P" & LR).SpecialCells(xlCellTypeVisible).Address
End With
Application.Dialogs(xlDialogPrint).Show
Range("P4").Value = Range("P4").Value + 1
Application.ScreenUpdating = True
End Sub[/vba]
How could the code be changed so that it selects the visible rows as a whole?
Any help on this would be kindly appreciated.
Thanks in advance.
Best Regards,
adamsm

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules