Dynamically set print area

R

R Mdld

I have a long list in a worksheet grows and wanes with
data entered deleted and I need to print just the part of
the list that actaully has data in it. I understand how
to set a dynamic range but the question is, how to set up
a vb routine to select the range, format it to fit on a
page(s) and print it. My dynamic range setting formula is
=OFFSET('Payables Matl'!$B$6,0,0,COUNTA('Payables Matl'!
$B:$B),11). There is already a print_area range set that
is larger than the the dynamic range mentioned here that
I don't want to disturb the print setting for. Can anyone
give me some guidance with this?

Thanks for the help,
Ron
 
T

Tom Ogilvy

Range("DynamicRangeName").Printout

If you want it to fit to a certain number of pages, then set the fit to
print settings in pagesetup.
 
R

RMDld

Super, Thanks Tom. Is there any way to set the page setup
programatically? In the spreadsheet have the page set for
printing the entire sheet but in the routine I'm trying
to get here, I only print a subset of that sheetfor which
I need different formating. So what can I do to avoid
having to reset that formatting each time before printing
the programmed subset?

Thanks again,
Ron
 

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

Top