Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Printing: Best Fit (1 Page Wide)

Im trying to write this small macro. I need to print a report which should be
the biggest font possible, but no more than 1 page wide. The sh is already
setup as landscape an centered. It can be any number of pages tall.

There are certain things the user could do to change the number of
rows/columns so this has to happen on the fly. I expect to use the
Workbook_BeforePrint event.

I thought of using a Do Until Loop as follows:

Sub BestFitPrint()
Sheet5.PageSetup.Zoom = 100
Do Until Sheet5.VPageBreaks.Count = 0
Sheet5.PageSetup.Zoom = Sheet5.PageSetup.Zoom - 5
Loop

Sheet5.PrintOut
End Sub

It's unlikely that the user will ever be able to print bigger than 100%

Does anyone have a better idea?
I would appreciate some help

Thanks in advance!
--
.- -. Bye Bye
/|6 6|\ - Pavlos
{/(_0_)\}
/ ^ \_
(/_/^\_\)
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
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
Cutting up very wide tables for printing leer317 Excel Discussion (Misc queries) 1 February 23rd 07 04:23 AM
printing wide text katie300m Excel Discussion (Misc queries) 0 January 26th 07 05:52 PM
Printing wide columns Richard Excel Discussion (Misc queries) 4 April 8th 05 04:39 PM
Page Header with Fit to 1 page wide Josh Smith[_2_] Excel Programming 0 July 15th 03 09:51 PM


All times are GMT +1. The time now is 03:12 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"