Sub print_dynamic_range_()
Dim sRange As String, eRange As String
'''cell c2 is beginning range
sRange = ActiveSheet.Range("c2"):
'''cell d2 is ending range
eRange = ActiveSheet.Range("d2")
Range(sRange & ":" & eRange).Select
Application.PrintCommunication = False
With ActiveSheet.PageSetup
.PrintTitleRows = ""
.PrintTitleColumns = ""
End With
ActiveSheet.PageSetup.PrintArea = ""
Application.PrintCommunication = False
With ActiveSheet.PageSetup
'''cells a2 and b2 are margin sizes
.LeftMargin = Application.InchesToPoints(Range("b2"))
.RightMargin = Application.InchesToPoints(Range("b2"))
.TopMargin = Application.InchesToPoints(Range("a2"))
.BottomMargin = Application.InchesToPoints(Range("a2"))
End With
Application.PrintCommunication = True
Selection.PrintOut Copies:=1, Collate:=True
End Sub