Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print Area and Excel 1

Status
Not open for further replies.

SharonMee

MIS
May 7, 2004
210
0
0
CA
Hello All:

Is there a way to make the Print Area cover all the rows with data in a worksheet? I.e. to make the Print Area dynamic?
 
Sharon,

Why not Page Setup - Page Tab, Scaling / 1 wide by 1 tall???

:)

Skip,

Want to get great answers to your Tek-Tips questions? Have a look at faq222-2244
 
See the discussion at thread68-888003.

You can call this kind of even on the Workbook BeforePrint event.

*cLFlaVA
----------------------------
A polar bear walks into a bar and says, "Can I have a ... beer?"
The bartender asks, "What's with the big pause?
 
Hmmm...the page setup thing does not work automatically though, am I right?

When I copy and paste data into a particular sheet, sometimes the data rows exceed the print area. I tried the page setup 1 by 1 but it doesn't work automatically.

I don't know how the Workbook BeforePrint thing works for Print Area.

Thanks again for helping out.
 
Only if you have SET a Print area.

If the PrintArea is Cleared, EVERYTHING on the sheet will print.

I mistakenly thought you wanted everything printed on ONE PAGE.

Skip,

Want to get great answers to your Tek-Tips questions? Have a look at faq222-2244
 
Sharon-

If you take a look at that thread, you'll see how to set the PrintArea of a particular worksheet to be equal to the range A1 -> The last (bottom, far right) cell that has data / formatting in it.

Once you put this code into a Macro, you can call the Macro when the Workbook's BeforeSave event gets triggered.

*cLFlaVA
----------------------------
A polar bear walks into a bar and says, "Can I have a ... beer?"
The bartender asks, "What's with the big pause?
 
When I said "BeforeSave" I meant "BeforePrint".

*cLFlaVA
----------------------------
A polar bear walks into a bar and says, "Can I have a ... beer?"
The bartender asks, "What's with the big pause?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top