+ Reply to Thread
Results 1 to 4 of 4

Set Print range to max that will fit on a page

  1. #1
    Forum Contributor
    Join Date
    08-03-2005
    Posts
    272

    Set Print range to max that will fit on a page

    Hi I have a fancy spread sheet that already has macros in it, would like to add some code at the end of one of my macros that holds the print range to the print area I already have, but it just changes the scaling "Adjust to ______% of normal size" variable. What happens is i have columns that the user can hide and unhide, the more columns they hide, the smaller the picture gets on the page because the scaling does not chnage from the maximum. I just want to say, ok hold the columns to fit on one page, but zoom in the max possible and still be on that one page. Note the rows do not matter, they can spill down to the next page. Is this something easy to do? Do you get what I am looking for? If my outside margins are .25 then I want it always to be zoomed to .25 margins no matter how many columns are hidden or unhidden.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Set Print range to max that will fit on a page

    Here's an old routine that you may be able to adapt:

    Please Login or Register  to view this content.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Contributor
    Join Date
    08-03-2005
    Posts
    272

    Re: Set Print range to max that will fit on a page

    Quote Originally Posted by xladept View Post
    Here's an old routine that you may be able to adapt:

    Please Login or Register  to view this content.
    Cool, I will try this, but if I already have something working, can I just do the "fit to Pages wide" and "fit to pages tall" part of that code? I don't want do define a bunch of other settings I already have set up.

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Set Print range to max that will fit on a page

    Yeah - sure, it's yours to adapt

+ 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. Excel 2010 - Custom Macro that scales a print range to fill the page
    By barnett2000 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-11-2013, 04:53 PM
  2. VBA to set print range, open box asking for print qty, print, then redefine print area
    By galvinpaddy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-11-2012, 06:43 PM
  3. Code to select a range and set it as the print range onto one page
    By rlsublime in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-10-2011, 03:37 PM
  4. Change print range "Page 1 to 3" to "Page 1 and 3"
    By london7871 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-19-2011, 01:24 AM
  5. [SOLVED] Can you get the range reference for each page in a worksheet print range?
    By Crosby in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-12-2005, 02: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