Hi you'll,
I have great printing macro that prints an area based on 1 cell.
Sub SetPrintRangeStudent1()
Dim PrintRange As Range
Dim FindRange As Range
'this line finds the location of the student in row 7
Set FindRange = ActiveSheet.Rows(7).Cells.Find(Range("D1"), , xlValues, xlWhole, xlByRows, xlNext, False)
If Not FindRange Is Nothing Then
'this line set the print range to 2 rows above the FindRange and 10 columns to the right
'it finds the bottom row automatically
Set PrintRange = Range(FindRange.Offset(-2, -3), Cells(65000, FindRange.Column).End(xlUp)).Resize(, 10)
ActiveSheet.PageSetup.PrintArea = PrintRange.Address
ActiveWindow.SelectedSheets.PrintPreview
End If
End Sub
I like to adjust this, so that on every page it also prints C9:C20.
Do I set a second print range for this?
Every suggestion is helpful.
Marco.
Bookmarks