Set Print Area

M

Mark

I would like to use the property Print Area. This property
requires two give two cells for the array: top-left corner
and the bottom-right one. The top-left corner is constant
at $A$1. The bottom right has a constant column "K" but
its row varies.

Worksheets("Sheet1").PageSetup.PrintArea = "$A$1:$K$?"

How could I specify the value for the row in the PrintArea
property taking into account that this value is a number
shown in cell $L$1

Can anyone provide me with the code?

Thank you very much,

Marc
 
K

Klaus

Try this

LastRow = Range("$L$1").Value
Worksheets("Sheet1").PageSetup.PrintArea = "$A$1:$K$" & _
LastRow

Regards
Klaus
 

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

Print Area propery 1
Dynamic Print Area (ActiveSheet) 5
VBA to set dynamic print area 1
Return Print Area Range 7
Dynanic Print Range 2
Print Area Range Selection 2
Set Print Area 1
combind print copy amount 1

Top