+ Reply to Thread
Results 1 to 4 of 4

VBA code to set out page print layout - height automatic

  1. #1
    Registered User
    Join Date
    07-01-2012
    Location
    Tilburg, the Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    96

    VBA code to set out page print layout - height automatic

    as mentioned in the topic, I recorded a macro while setting a page layout, the only thing I've changed is page height to 'automatic'; the code that I get is the following:
    (please note that there were some other changes in printing properties before)


    Please Login or Register  to view this content.

    how to take out only the small part of code that is responsible for changing the property mentioned in the topic? Is that possible at all? thanks for your help.

  2. #2
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: VBA code to set out page print layout - height automatic

    Hi,

    The part that is responsible for making the height automatic is
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    So your code in its entirety would be
    Please Login or Register  to view this content.
    Hope this helps

  3. #3
    Registered User
    Join Date
    07-01-2012
    Location
    Tilburg, the Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    96

    Re: VBA code to set out page print layout - height automatic

    Thanks, I put this line to the code mentioned in my first post and it works:

    Please Login or Register  to view this content.

  4. #4
    Valued Forum Contributor
    Join Date
    02-08-2012
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2007 and Excel 2010
    Posts
    1,429

    Re: VBA code to set out page print layout - height automatic

    You're welcome!

    Please don't forget to mark this thread as solved

+ 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. How to only the print area in the page layout view?
    By monarchos in forum Excel General
    Replies: 2
    Last Post: 05-24-2012, 05:30 PM
  2. Replies: 5
    Last Post: 10-01-2009, 05:06 PM
  3. Replies: 8
    Last Post: 02-02-2009, 04:21 PM
  4. [SOLVED] How do I print a page with a horizontal layout?
    By Bev in forum Excel General
    Replies: 2
    Last Post: 07-27-2006, 09:59 AM
  5. Replies: 0
    Last Post: 07-04-2006, 09:25 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