+ Reply to Thread
Results 1 to 4 of 4

How do I set the vertical page breaks between columns with a macro?

  1. #1
    Registered User
    Join Date
    06-18-2012
    Location
    USA, Midwest
    MS-Off Ver
    Excel 2016
    Posts
    16

    How do I set the vertical page breaks between columns with a macro?

    I am trying to make a macro that sets up a worksheet for printing. I need to know how to set the vertical page break between (EXAMPLE) columns J and K. Or alternatively , set it on the right side of the set printing area. What is the VB command to do this?

    Note 1: I actually need to set the first vertical page break between columns "J" and "K". Not make a new vertical page break, but set the first vertical page break.

    Note 2: I orginally set it up so it switched to a printing view, then grabs the vertical page break and pulls it over a couple of columns. But sometimes that pulls the break outside the printing area and causes the macro to error.

  2. #2
    Forum Contributor
    Join Date
    05-04-2012
    Location
    Stamford,Connecticut,USA
    MS-Off Ver
    Excel 2003
    Posts
    105

    Re: How do I set the vertical page breaks between columns with a macro?

    By resetting all page breaks and the setting the page break after the cell you choose, you will ensure the page break bewteen columns J and K is the first vertical page break
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    06-18-2012
    Location
    USA, Midwest
    MS-Off Ver
    Excel 2016
    Posts
    16

    Re: How do I set the vertical page breaks between columns with a macro?

    Thanks for your help. Wasn't what I ended up useing, but thanks. Found a way to have the only page break be set to the right side of the print area instead.

    Please Login or Register  to view this content.
    Last edited by Cutter; 07-20-2012 at 08:27 PM. Reason: Added code tags

  4. #4
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: How do I set the vertical page breaks between columns with a macro?

    @ SL_Mills

    Based on your last post it seems that you have found a solution but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself.
    Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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