Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default Print to fit one page

Whatever code you are using couldn't you just add something like:

If ***Your Criteria Prints Just Page One*** Then

With ActiveSheet.PageSetup
.FitToPagesWide = 1
.FitToPagesTall = 1
End With

Else

With ActiveSheet.PageSetup
.FitToPagesWide = 1
.FitToPagesTall = 2
End With

End If

Hopefully this should work.

-Brian

Shawn wrote:
I have a .xls file that has data that spreads across two printed pages (or
that I want to spread across two printed pages). If certain critrea are met,
page 1 prints. If other criteria are met, page 1 and page 2 are printed. I
need a code that will continue to do the above but fit page 1 on one printed
page and if both pages are to be printed, then fit page 1 and page 2 on 2
printed pages. Right now, the first page may run over one or two lines onto
a second printed page. I hope this makes sence.


--
Thanks
Shawn


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Print to fit one page

Use also Zoom

With sh.PageSetup
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = False
.Orientation = xlLandscape
End With

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Brian B." wrote in message oups.com...
Whatever code you are using couldn't you just add something like:

If ***Your Criteria Prints Just Page One*** Then

With ActiveSheet.PageSetup
.FitToPagesWide = 1
.FitToPagesTall = 1
End With

Else

With ActiveSheet.PageSetup
.FitToPagesWide = 1
.FitToPagesTall = 2
End With

End If

Hopefully this should work.

-Brian

Shawn wrote:
I have a .xls file that has data that spreads across two printed pages (or
that I want to spread across two printed pages). If certain critrea are met,
page 1 prints. If other criteria are met, page 1 and page 2 are printed. I
need a code that will continue to do the above but fit page 1 on one printed
page and if both pages are to be printed, then fit page 1 and page 2 on 2
printed pages. Right now, the first page may run over one or two lines onto
a second printed page. I hope this makes sence.


--
Thanks
Shawn


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Print to fit one page

Try this tester for the selection

I will preview the printout
Delete preview:=True when it is working correct

Sub test()
With ActiveSheet.PageSetup
.PrintArea = Selection.Address
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
.Orientation = xlLandscape
End With
ActiveSheet.PrintOut preview:=True
End Sub


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Shawn" wrote in message ...
I tried this but it didn't work:

With Selection
.FitToPagesWide = 1
.PrintOut copies:=1, collate:=True
End With


--
Thanks
Shawn


"Ron de Bruin" wrote:

Use also Zoom

With sh.PageSetup
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = False
.Orientation = xlLandscape
End With

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Brian B." wrote in message oups.com...
Whatever code you are using couldn't you just add something like:

If ***Your Criteria Prints Just Page One*** Then

With ActiveSheet.PageSetup
.FitToPagesWide = 1
.FitToPagesTall = 1
End With

Else

With ActiveSheet.PageSetup
.FitToPagesWide = 1
.FitToPagesTall = 2
End With

End If

Hopefully this should work.

-Brian

Shawn wrote:
I have a .xls file that has data that spreads across two printed pages (or
that I want to spread across two printed pages). If certain critrea are met,
page 1 prints. If other criteria are met, page 1 and page 2 are printed. I
need a code that will continue to do the above but fit page 1 on one printed
page and if both pages are to be printed, then fit page 1 and page 2 on 2
printed pages. Right now, the first page may run over one or two lines onto
a second printed page. I hope this makes sence.


--
Thanks
Shawn


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do you print single page multiply times with increasing page . aliasmith Excel Worksheet Functions 2 September 26th 08 12:30 AM
Setting the print area in page set up to print 1 page wide by 2 pages tall EA[_2_] Excel Discussion (Misc queries) 2 July 12th 07 08:39 PM
PRINT PAGE BREAK VIEW AS WATERMARK FIOR EACH PAGE RALPH Setting up and Configuration of Excel 3 March 16th 06 11:08 PM
Active cell counting in particular print page (one sheet having different print area) ananthmca2004 Excel Worksheet Functions 1 November 24th 05 11:29 AM
How do I print a one page spreadsheet multiple time, each with its own page number? lhsallwasser Excel Discussion (Misc queries) 4 August 17th 05 03:00 PM


All times are GMT +1. The time now is 10:34 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"