Print Area Help!

L

Lindsay

I have designed a document with 1200 lines that have been formatted. Some of
the users will have only 20 lines, but some will have 1000. I would like them
to be able to print only the pages that they have used, but I can only figure
out how to make it print all 1200 lines or only 1 page. Thanks!
 
C

Crowbar via OfficeKB.com

I think a macro is the way to go with this

Function GetUsedArea

Dim LastRow as Long

LastRow = Sheet1.usedrange.row + sheet1.usedrange.rows.count -1

sheet1.printarea = "$a$1:$f$" & LastRow

End Function
I have designed a document with 1200 lines that have been formatted. Some of
the users will have only 20 lines, but some will have 1000. I would like them
to be able to print only the pages that they have used, but I can only figure
out how to make it print all 1200 lines or only 1 page. Thanks!

--
Anthony Prescott
http://www.apofficesolutions.co.uk

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.aspx/excel-new/200812/1
 
G

Gord Dibben

Several methods could be employed depending upon which rows would be
applicable for each user.

A Custom View for each user, including printrange.

An InputBox which collects the number of rows to print.

An Autofilter returning only distinct rows for each user.


Gord Dibben MS Excel MVP
 
L

Lindsay

Oh my, I'm not really sure what a macro is or how to use one. Is there a more
simple way? It worked last year by itself, but for some reason it isnt now.
 
S

Shane Devenshire

Hi,

Here are a number of options

1. Have the user select the range they want to print and then choose File,
Print, and under Print what choose Selection.
2. Have the user select the range and choose File, Print Area, Set Print
Area. The use the regular print command
3. Depending on the data it may be possible to apply a AutoFilter and then
choose Not Blank and then print.

You can also set the print range under File, Page Setup, Sheet
 

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