John.McLaughlin
Board Regular
- Joined
- Jul 19, 2011
- Messages
- 169
Hello!
I am trying to Set a print range from the relative position.
The Debug Error Highlights - ".PrintArea = FN"
I am trying to Set a print range from the relative position.
The Debug Error Highlights - ".PrintArea = FN"
Code:
Sub PDF_Relative_Position_v1()
Application.ScreenUpdating = False
Sheets("TOOLS & SUPPLIES").Select
Dim FN As Range
Set FN = Range(ActiveCell.Offset(0, 43), ActiveCell.Offset(0, 2))
With ActiveSheet.PageSetup
.PrintArea = FN
End With
ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=Range("A3"), _
Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=True
Application.ScreenUpdating = True
End Sub