Setting Print Area based on a calculated value in a cell


Posted by Jason on July 13, 2000 11:58 AM

I have a value calculated in a cell (C10), and I would like to dynamically set the print area to be from A1:(Value of C10+1)18. Always printing the first 18 rows, and changing the amount of columns based on the C10 value (incremented by one).

Any ideas?

Thanks,

Jason

Posted by Ryan on July 13, 0100 12:15 PM

Here you go Jason,
Hope everything's going good!

Ryan

Sub SetPrintArea()
ActiveSheet.PageSetup.PrintArea = Range(Cells(1, 1), Cells(18, Range("C10").Value + 1)).Address
End Sub



Posted by Jason on July 13, 0100 12:30 PM

Excellent! Muy bien!

Thanks,

Jason