Results 1 to 4 of 4
  1. #1
    5 Star Lounger
    Join Date
    May 2001
    Location
    Philadelphia, Pennsylvania
    Posts
    676
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Complex footer code (Excel 97)

    I have finally developed my "Before Print" footer information just about where I like it. I have the complete pathway down to the tab on the left hand side, the Page of Pages in the center and the Date and Time on the right. OK. But some of the pathways, even on landscape, overwrite the page of pages field. I guess I could amend my left footer with linefeeds to break up that line, but that makes the pathway somewhat harder to read. My question: Is there a way to insert some kindof code for the Center and Right hand side to shift them down a line so that one or both then appear under the extended pathway footer? I have tried putting vbLF and CHR(10)s in there at the beginning of the required "&P of &N" notations, but it didn't seem to work.TYIA

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: Complex footer code (Excel 97)

    Don't try to bring the right and center code DOWN, bring the left up:

    If you add the CRLF at the END of the footer it will raise the field up on the page.

    Steve

  3. #3
    3 Star Lounger Jim Cone's Avatar
    Join Date
    Feb 2002
    Location
    Portland, Oregon, USA
    Posts
    238
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: Complex footer code (Excel 97)

    W.C. Fields,

    Assign the text to a String variable and then put it in the footer.
    Run the following and see how it looks....

    Sub FixFooter()
    Dim MyStr As String

    MyStr = "&P of &N"
    ActiveSheet.PageSetup.LeftFooter = MyStr

    MyStr = "&P of &N" & vbCr
    ActiveSheet.PageSetup.CenterFooter = MyStr

    MyStr = "&P of &N" & vbCr & vbCr
    ActiveSheet.PageSetup.RightFooter = MyStr
    End Sub

    Regards,

    Jim Cone
    San Francisco, CA

  4. #4
    5 Star Lounger
    Join Date
    May 2001
    Location
    Philadelphia, Pennsylvania
    Posts
    676
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Complex footer code (Excel 97)

    I attached the & vbCR to the left-side footer and it worked perfectly. Thanks <img src=/S/salute.gif border=0 alt=salute width=15 height=20>

Posting Permissions

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