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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top