Lee Rabbit
New Member
- Joined
- Apr 30, 2020
- Messages
- 43
- Office Version
- 2010
- Platform
- Windows
Hi all, please see code below. Has been working fine for a long time but now issues.
When I export I am seeing my PDF as 3 separate pages instead of the data being exported to a single page.
Any ideas why this may be happening? Thanks in advance
When I export I am seeing my PDF as 3 separate pages instead of the data being exported to a single page.
Any ideas why this may be happening? Thanks in advance
VBA Code:
Sub emailPDF_Sunday()
Range("B3:B58").Select
Selection.Copy
Range("B70").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Range("C3:D58").Select
Application.CutCopyMode = False
Selection.Copy
Range("C70").Select
Selection.PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
With ActiveSheet.PageSetup
.Orientation = xlPortrait
.PrintArea = ("$B$70:$D$130")
.Zoom = False
.FitToPagesTall = 1
.FitToPagesWide = 1
End With
Application.ScreenUpdating = False
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
filename:="C:\PDF\" & Range("B3").Value & " " & Range("D3").Value
Application.ScreenUpdating = True
MsgBox "PDF HAS BEEN SAVED", vbExclamation
Call RowsDelete
Range("A1").Select
End Sub