PDA

View Full Version : setting Print Area



tqm1
06-28-2007, 04:48 AM
Dear Experts

How to assign Print range
from range("c3") to range("P" & .Rows.Count).End(xlUp).Row

I want to print from c3 to last used row of Column P

Please help

mvidas
06-28-2007, 05:40 AM
Hi,

With ActiveSheet 'or whatever sheet reference you want
.PageSetup.PrintArea = .Range("c3", .Cells(.Rows.Count, "P").End(xlUp)).Address
End With

Aussiebear
06-28-2007, 05:50 AM
You could also to this site and review their method.

http://www.dailydoseofexcel.com/archives/2004/05/21/setting-the-print-area-with-vba/

(Sorry Matt, didn't mean to steal your thunder on this one)

mvidas
06-28-2007, 05:55 AM
Never a problem, I'm not territorial (or have much thunder to steal anyways :))