VBA Code:
Lr1 = Range("AG1")
Lr2 = Range("AG65")
Application.PrintCommunication = True
ActiveSheet.PageSetup.PrintArea = "$A$1:$B$" & Lr1 & ",$D$1:$E$" & Lr1 & ",$G$1:$H$" & Lr1 & ",$J$1:$K$" & Lr1 & ",$M$1:$N$" & Lr1 & _
",$P$1:$Q$" & Lr1 & ",$S$1:$T$" & Lr1 & ",$V$1:$W$" & Lr1 & ",$Y$1:$Z$" & Lr1 & ",$AB$1:$AC$" & Lr1 & _
",$A$65:$B$" & Lr2 & ",$D$65:$E$" & Lr2 & ",$G$65:$H$" & Lr2 & ",$J$65:$K$" & Lr2 & ",$M$65:$N$" & Lr2 & _
",$P$65:$Q$" & Lr2 & ",$S$65:$T$" & Lr2 & ",$V$65:$W$" & Lr2 & ",$Y$65:$Z$" & Lr2 & ",$AB$65:$AC$" & Lr2 & _
Application.PrintCommunication = False
where AG1=37 and AG65=94
I'm not sure what I need to do to get the above Printarea to get fixed. but I need A1:B and Lr1 , D1:E and Lr1 so on.
using the above somehow selects A1:AO124 contiguous print area not sure why. Any help is greatly appreciated