Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 81
Default How to Maximize Print Size

I need to adjust the zoom settings on Page Setup to fill up the printed
page. (The reverse of condensing the page to fit on one page.)

Any ideas on how to do this with VBA? Manually playing with the zoom
settings isn't an option. I've created a mini-crossword app and the
print range changes based on the size of the puzzle. I don't want the
user to have to adjust the settings.

Since I've calculated the print range in VBA, I would assume that I
could calculate the combined width of the columns and length of the
rows. Could this be converted to something that would determine how
much of the page would be filled then adjust zoom accordingly?

Thanks for the ideas and any sample code.

- John

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default How to Maximize Print Size

Hello

Here how I would do it in VBA, but maybe there is a better manner
Mine is to put the zoom at minimum and count page, if it is still 1, it
will continues to add zoom until page count is 2


Sub FitToPage()
Application.ScreenUpdating = False
For i = 10 To 400
ActiveSheet.PageSetup.Zoom = i
numPages = ExecuteExcel4Macro("Get.Document(50)")
If numPages 1 Then
ActiveSheet.PageSetup.Zoom = i - 1
Exit For
End If
Next
End Sub

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 81
Default How to Maximize Print Size

Great idea. Much simpler than what I was thinking.

Thanks!

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
I am trying to print on legal size paper, i cant set size. Michele Excel Discussion (Misc queries) 1 December 14th 09 02:44 PM
Save as PDF not same size as Print and Print Preview in Excel Jack_Sprat Excel Discussion (Misc queries) 4 April 13th 09 06:38 PM
Zoom size doesn't equal print size vinceh Excel Discussion (Misc queries) 2 August 13th 08 12:03 AM
Excel-menu feature to maximize print area of sheet Skram Excel Discussion (Misc queries) 0 June 13th 06 03:58 PM
print view & print, in excel, different size cells buddyorliz Excel Discussion (Misc queries) 3 September 1st 05 01:20 PM


All times are GMT +1. The time now is 01:52 AM.

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"