auto scale print area

  • Thread starter Thread starter Jase
  • Start date Start date
J

Jase

I am trying to figure out a way to manually adjust my print area on a dynamic
data sheet. I was hoping to implement some code that says find the last row
for the print area.

Any help?

thanks,

jase
 
If the print area is left undefined, it will print everything on the sheet.
 
I tried doing that but it messed up all my fonts and margins and header.

This is what I got now: ActiveSheet.PageSetup.PrintArea = "$A$1:$T$" &
Cells.SpecialCells(xlCellTypeLastCell).Row

but this is telling me my last row is 345 but i only have data up to 142.
Its reading blank fields or something.
 
Maybe you can reset the used range.

Visit Debra Dalgleish's site for some techniques:
http://contextures.com/xlfaqApp.html#Unused

Or if you can pick out a column that will determine the last row to print:

with activesheet
.PageSetup.PrintArea = "$A$1:$T$" & .cells(.rows.count,"A").end(xlup).row
end with

(I used column A.)
 

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

Back
Top