Set print area with code

  • Thread starter Thread starter marc
  • Start date Start date
M

marc

I wonder who could help me with this:

When the user clicks on a button I would like to visualise
a preview of the current page, but before I need to define
Set Print Area according to the coordinates given in four
cell (the four corners of the print area). What is the
code that will set the print area according to the
information given in four cells?

Thank you,

marc
 
Hi

You only need 2 cells. The top left and bottom right of the print area.

Something like this.

ActiveSheet.PageSetup.PrintArea = "$C$10:$E$15"

HTH

Ken
 
Back
Top