+ Reply to Thread
Results 1 to 9 of 9

Maximize zoom to fit on one page

  1. #1
    Registered User
    Join Date
    02-20-2014
    Location
    LA
    MS-Off Ver
    Excel 2013
    Posts
    27

    Maximize zoom to fit on one page

    Hello,

    I found this cool script online, but it doesn't seem to be working properly for me. I was wondering if one of you geniuses could help me out please!

    Please Login or Register  to view this content.
    Basically, the numpages is not being updated. The code will zoom to 20% and keep going to 100%, but the numpages value is always staying at 1 for each i, and I can't seem to figure out why...

    Any help is very much appreciated!!

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Maximize zoom to fit on one page

    if you just want maximum zoom
    why not just set Fit to page instead?

    Please Login or Register  to view this content.
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    02-20-2014
    Location
    LA
    MS-Off Ver
    Excel 2013
    Posts
    27

    Re: Maximize zoom to fit on one page

    Hi!

    Fit to page doesn't necessarily zoom at the most maximum level. I want to be able to fill up the page as most as possible, without going over 2 pages.

  4. #4
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Maximize zoom to fit on one page

    ExecuteExcel4Macro doesnt seem to update while inside the macro so try using ActiveSheet.PageSetup.Pages.Count instead

    Please Login or Register  to view this content.
    however with this method i get the same results as fit to page does

  5. #5
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Maximize zoom to fit on one page

    hmm so i ran my code manually...ie line by line it works
    however if it just run outright it it doesnt work either...its not updating numpages as it goes along even with screenupdating turned on

    ill ask some experts if they have seen this before

  6. #6
    Registered User
    Join Date
    02-20-2014
    Location
    LA
    MS-Off Ver
    Excel 2013
    Posts
    27

    Re: Maximize zoom to fit on one page

    Hi,

    Was just wondering if you got another crack at this. I feel like the logic is all there and sound, but I just can't get that numpages to update either.

  7. #7
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Maximize zoom to fit on one page

    Please Login or Register  to view this content.
    managed to get this to work....screen flickering at all
    but as mentioned before in the test example i get the same result % scaling wise as fit to page method above

  8. #8
    Registered User
    Join Date
    02-20-2014
    Location
    LA
    MS-Off Ver
    Excel 2013
    Posts
    27

    Re: Maximize zoom to fit on one page

    This worked for me! When I fit to 1 page, my scaling is still not perfect (71%), but your macro scales it perfectly (84%).

    Thanks again!!

  9. #9
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Maximize zoom to fit on one page

    not a problem

    it may be the difference in margin or paper or some other variable of which i cannot test/may not know about

    glad to hear it worked in the end

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. 60% Zoom in Page Break Preview
    By Ratna K. Sthapit in forum Excel General
    Replies: 4
    Last Post: 11-14-2016, 01:53 AM
  2. Page setup zoom false to true
    By aprildu in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-04-2016, 10:20 AM
  3. Cannot view, page & zoom PDF on User Form
    By Colin Smit in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 10-07-2014, 11:30 PM
  4. PrintOut fit to page (zoom)
    By Remphan in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-19-2013, 01:27 PM
  5. locking the zoom on a page?
    By shortman_alan in forum Excel General
    Replies: 3
    Last Post: 01-23-2007, 09:03 PM
  6. Print setup - fit to page - zoom
    By Zurn in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-08-2006, 06:51 AM
  7. [SOLVED] Calculate page setup zoom value for 1 to 1 printing
    By mgill in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-09-2005, 05:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1