+ Reply to Thread
Results 1 to 8 of 8

Can't fix the printing area of my worksheet!

  1. #1
    Forum Contributor
    Join Date
    06-18-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    106

    Can't fix the printing area of my worksheet!

    the code below is designed to perform two tasks on the attached worksheet. This worksheet is acturally created by another macro so I needed to create a new named range evertime you try and print it.

    Tasks:

    Establish a named range as: "MARKED_UP_BUDGET"
    Establish the rows to repeat at the top $1:$9
    Establish print area as "MARKED_UP_BUDGET"
    Print a PDF

    You will see however that the third step is not dynamic, you cannot set:
    Please Login or Register  to view this content.
    so instead I have:
    ActiveSheet.PageSetup.PrintArea = "B1:L1000" which is not ideal. is there a way to insure that the print area is always set dynamically?

    Please Login or Register  to view this content.

  2. #2
    Forum Expert OllieB's Avatar
    Join Date
    12-20-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2007 (home) & 2010 (office)
    Posts
    1,542

    Re: Can't fix the printing area of my worksheet!

    Try

    Please Login or Register  to view this content.
    If you like my contribution click the star icon!

  3. #3
    Forum Contributor
    Join Date
    06-18-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    106

    Re: Can't fix the printing area of my worksheet!

    Quote Originally Posted by OllieB View Post
    Try

    Please Login or Register  to view this content.
    This code worked great: Many thanks I'll rep you. One more question though: which part of my code is responsible for forcing the range to fit one page as opposed to the % of the page.... I want it to print over the the amount of pages required whilst maintaining formatting, sizes

    EDIT: I guess what I'm trying to say is I cant' find a means of forcing excel to use the option adjust to page instead of fit to page: I don't want it printed all to one page if the sheet is long because everything shrinks!
    Last edited by niceguy21; 02-08-2013 at 09:04 AM.

  4. #4
    Forum Expert OllieB's Avatar
    Join Date
    12-20-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2007 (home) & 2010 (office)
    Posts
    1,542

    Re: Can't fix the printing area of my worksheet!

    niceguy21, the two options below can be used to manipulate the output


    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    06-18-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    106

    Re: Can't fix the printing area of my worksheet!

    Quote Originally Posted by OllieB View Post
    niceguy21, the two options below can be used to manipulate the output


    Please Login or Register  to view this content.
    What would you suggest doing?

  6. #6
    Forum Expert OllieB's Avatar
    Join Date
    12-20-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2007 (home) & 2010 (office)
    Posts
    1,542

    Re: Can't fix the printing area of my worksheet!

    niceguy21, it all depends on the size and layout of your document! I cannot see what is happening, how it looks and what would be the most practical way of printing.

    I would try setting (Tall=10 pages is just arbitrarily chosen, I think it will ignore a value that is too high anyway):

    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    06-18-2012
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    106

    Re: Can't fix the printing area of my worksheet!

    Quote Originally Posted by OllieB View Post
    niceguy21, it all depends on the size and layout of your document! I cannot see what is happening, how it looks and what would be the most practical way of printing.

    I would try setting (Tall=10 pages is just arbitrarily chosen, I think it will ignore a value that is too high anyway):

    Please Login or Register  to view this content.

    Okay this is a step forwards for sure! all the pages are being printed.. all the way to page 10 with my desired level of zoom. However, the heading is still carried down 10 sheets.. how do correct this and have a dynamic number of sheets?

    Many thanks

  8. #8
    Forum Expert OllieB's Avatar
    Join Date
    12-20-2012
    Location
    Netherlands
    MS-Off Ver
    Excel 2007 (home) & 2010 (office)
    Posts
    1,542

    Re: Can't fix the printing area of my worksheet!

    I am not really sure what you are asking. Is you report longer or shorter than 10 pages? What would be the settings you would use when you print the report manually?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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