+ Reply to Thread
Results 1 to 2 of 2

Determine last row before end of page on worksheet

  1. #1
    dclarkston
    Guest

    Determine last row before end of page on worksheet

    I am trying to develop some reports in Excel from VB6.0. The reports
    have multiple records that can span several rows. Each record has a
    commments field in it, so the height of a cell can very greatly from
    record to record. What I am trying to figure out is an easy way to
    determine what was the last row on a page in excel, so that when it
    goes to a new page, it will reprint the title and the column names.
    Currently I am calculating the height of every row and then based on if
    the pagesetup is landscape or portrait, comparing that number to the
    total height of the page to determine when the page ends...Is there a
    simpler way to achieve this?


  2. #2
    Rowan
    Guest

    Re: Determine last row before end of page on worksheet

    Have you tried setting the Rows to Repeat At Top property?
    File>PageSetup>Sheet>Rows To Repeat at Top

    Hope this helps
    Rowan

    dclarkston wrote:
    > I am trying to develop some reports in Excel from VB6.0. The reports
    > have multiple records that can span several rows. Each record has a
    > commments field in it, so the height of a cell can very greatly from
    > record to record. What I am trying to figure out is an easy way to
    > determine what was the last row on a page in excel, so that when it
    > goes to a new page, it will reprint the title and the column names.
    > Currently I am calculating the height of every row and then based on if
    > the pagesetup is landscape or portrait, comparing that number to the
    > total height of the page to determine when the page ends...Is there a
    > simpler way to achieve this?
    >


+ 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