Results 1 to 3 of 3
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Thanked 0 Times in 0 Posts

    Last Line On A Page (2000)

    I would like to make sure that a piece of data (the filename in the format "=filename()", as opposed to the footer) is inserted in the last cell at the bottom of a page in the right most column. Is there any code out there that will make sure this will occur?

  2. #2
    5 Star Lounger
    Join Date
    Apr 2003
    Hampshire, United Kingdom
    Thanked 0 Times in 0 Posts

    Re: Last Line On A Page (2000)

    Just to be clear - when you say "page" do you mean page as printed, or the bottom-right-most cell in a worksheet? One potential problem with either is that the bottom-right cell (of a page OR a worksheet) may contain data - what should happen then? (Overwrite / use next line / use next column)?
    If at first you do succeed, you've probably missed something.

  3. #3
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Pittsburgh, Pennsylvania, USA
    Thanked 342 Times in 335 Posts

    Re: Last Line On A Page (2000)

    There is no built-in way to do this . The easiest is using the footer. What issues do you that using the footer is not feasible? XL can put the filename in the footer easily.

    If it is simply a matter a a different format for the filename, you can have it change the footer on the before print event (I am not sure what format you want for the filename)

    If you really need to add something at the bottom of each break it can get cumbersome and slow. You will need to loop thru the location property of the hPagebreak object. The problem can be if the sheet is reformatted, you may need code to find the previous ones added and remove them. This can be done with each printing, but it could be problematic.

    Could you elaborate on what exactly you want/need?


Posting Permissions

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