Results 1 to 5 of 5
  1. #1
    Lounger
    Join Date
    Feb 2004
    Location
    Hatboro, Pennsylvania, USA
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Identifying print-column breaks in VBA (2000+)

    Within VBA, after setting a large cell-range to be printed, is there a way to identify at which columns (and rows) there will be page-breaks ??

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Identifying print-column breaks in VBA (2000+)

    The HPageBreaks and VPageBreaks collections of the worksheet contain the horizontal and vertical page breaks within the print area. The Location property of an HPageBreak object indicates the range whose upper edge forms the page break; for a VPageBreak object it indicates the range whose left edge forms the page break.

  3. #3
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Identifying print-column breaks in VBA (2000+)

    Hi Paul

    How about this:

    Sub PageBreak()

    ActiveWindow.View = xlPageBreakPreview
    End Sub
    Jerry

  4. #4
    Lounger
    Join Date
    Feb 2004
    Location
    Hatboro, Pennsylvania, USA
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Identifying print-column breaks in VBA (2000+)

    Thanks, Hans..
    This should solve my problem of having to programatically column-merge some multi-column labels before printing.

  5. #5
    Lounger
    Join Date
    Feb 2004
    Location
    Hatboro, Pennsylvania, USA
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Identifying print-column breaks in VBA (2000+)

    ...and I can use this, too!
    Tks much!

Posting Permissions

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