I am trying to setup a printarea using vba with no luck. I would appreciate so help if possible. I have tried a couple of different combinations with no success. I keep on getting a compile error on the red line.
Code:
Sub PrintAreaSetup()
Dim PR1 As String
Dim PR2 As String
Dim LR As String
LR = ActiveSheet.UsedRange.Rows.Count
PR1 = "$A$1"
PR2 = "$F" & "$" & LR
Range(PR1, PR2).Select
[red] ActiveSheet.PageSetup.PrintArea = ("PR1:PR2")[/red]
With ActiveSheet.PageSetup
.LeftFooter = "&F"
.CenterFooter = "&A"
.RightFooter = "&"""
End With
'
End Sub