+ Reply to Thread
Results 1 to 3 of 3

Coding for custom footer

  1. #1
    cakprogramming
    Guest

    Coding for custom footer

    I am trying to put 1 of 4 footers into the center footnote via a macro. Which
    footer that goes in depends on the scenario selected by the end user.

    The longest of the 4 footnotes is 198 characters. The left footnote is 56
    characters. The right footnote is today's date and should have a maximum
    length of 10 characters.

    So the sum of all of these never exceeds the 255 mark.

    Yet I get an error message "Runtime 1004. Unable to set the CenterFooter
    property in Page Setup" on 3 of the 4 footnotes.

    If need be, how do you paste or insert one of four pictures in the
    CenterFootnote?

  2. #2
    Gary''s Student
    Guest

    RE: Coding for custom footer

    Sub Macro1()
    Dim s As String
    s = Cells(1, 1).Value
    ActiveSheet.PageSetup.CenterFooter = s
    End Sub

    will set the centerfooter to some text string

    If you want a picture in the centerfooter then

    ActiveSheet.PageSetup.CentertFooterPicture.FileName = "C:\pic.jpg"
    or some other text string specifying the file


    --
    Gary''s Student


    "cakprogramming" wrote:

    > I am trying to put 1 of 4 footers into the center footnote via a macro. Which
    > footer that goes in depends on the scenario selected by the end user.
    >
    > The longest of the 4 footnotes is 198 characters. The left footnote is 56
    > characters. The right footnote is today's date and should have a maximum
    > length of 10 characters.
    >
    > So the sum of all of these never exceeds the 255 mark.
    >
    > Yet I get an error message "Runtime 1004. Unable to set the CenterFooter
    > property in Page Setup" on 3 of the 4 footnotes.
    >
    > If need be, how do you paste or insert one of four pictures in the
    > CenterFootnote?


  3. #3
    Mike Fogleman
    Guest

    Re: Coding for custom footer

    198+56+10=264

    Mike F
    "cakprogramming" <[email protected]> wrote in message
    news:[email protected]...
    >I am trying to put 1 of 4 footers into the center footnote via a macro.
    >Which
    > footer that goes in depends on the scenario selected by the end user.
    >
    > The longest of the 4 footnotes is 198 characters. The left footnote is 56
    > characters. The right footnote is today's date and should have a maximum
    > length of 10 characters.
    >
    > So the sum of all of these never exceeds the 255 mark.
    >
    > Yet I get an error message "Runtime 1004. Unable to set the CenterFooter
    > property in Page Setup" on 3 of the 4 footnotes.
    >
    > If need be, how do you paste or insert one of four pictures in the
    > CenterFootnote?




+ 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