• Complex footer code (Excel 97)

    Author
    Topic
    #384212

    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

    Viewing 2 reply threads
    Author
    Replies
    • #658290

      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

    • #658292

      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

    • #658625

      I attached the & vbCR to the left-side footer and it worked perfectly. Thanks salute

    Viewing 2 reply threads
    Reply To: Complex footer code (Excel 97)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: