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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Resize page automatically for printer 1

Status
Not open for further replies.

calvinb

Technical User
Jan 22, 2012
47
CA
I have a form in Excel 2010 that my coworkers and I have to print doing our job. I use the following code to print the form:

Code:
Sheets("ControlSheet").PrintOut

When I print the form, it prints fine but when some of my co-workers print it, it doesn't fit on one page. It actually takes 4 pages to print the one page. The right column and bottow row doesn't fit on one page but when I print (to the same printer!) it prints ok.

Is there a way to force the page to print on one page no matter what computer is being used?
 
Something like this ?
Code:
With Sheets("ControlSheet").PageSetup
    .FitToPagesWide = 1
    .FitToPagesTall = 1
End With
Sheets("ControlSheet").PrintOut

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 

Thanks for you quick answer!!

I'll give it a try tomorrow at work. I appreciate the help.

 

Ok. I tried that code at work but it still didn't print everything on one page. It still printed about a half inch of the right column on a second page and the bottom row on another page.

The two computers that are causing this problem seem to be different than other computers at work. That may be what is causing this problem. The shading on the page is very coarse and the border lines are rough like the pixels are very coarse whereas on my computer the shading is fine texture and the lines are like lines.... not jagged in places. I don't know why those 2 computers are different than all the rest but they seem to be.

So, unless you have some ideas on other things I could try, I'm going to chalk this problem up to their computer settings.

Thanks for you help.
 


calvin,

This kind of question can best be answered by YOU on the SHEET using Print Preview and playing around with the Page Setup. Once you figure out how to configure your setup, then turn on your macro recorded to memorialize the process.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
I would examine the printer drivers and re-install them.

Gavin
 

Yeah, I think it's the printer drivers also but my computer is fine. It prints on one page but a couple of my co-workers seem to have different drivers and it doesn't work for them. I'm not allowed to change the drivers so they have just moved the right border on the sheet until it all fits and they'll have to make do!!

Thanks everyone.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top