+ Reply to Thread
Results 1 to 5 of 5

macro that adds left and right footers

  1. #1
    Keith
    Guest

    macro that adds left and right footers

    I have an application where a macro adds left and right footers. However,
    once the code assigns the left footer, the macro generates an error saying
    "Unable to set the RightFooter property of PageSetup Class."

    If the right footer is assigned first, the same error is genearted for the
    left footer.

    Any insights?

  2. #2
    Bob Phillips
    Guest

    Re: macro that adds left and right footers

    If you show us the cod we might have.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Keith" <[email protected]> wrote in message
    news:[email protected]...
    > I have an application where a macro adds left and right footers. However,
    > once the code assigns the left footer, the macro generates an error saying
    > "Unable to set the RightFooter property of PageSetup Class."
    >
    > If the right footer is assigned first, the same error is genearted for the
    > left footer.
    >
    > Any insights?




  3. #3
    Keith
    Guest

    Re: macro that adds left and right footers

    here is the code:

    Sub Procedure1()
    ********
    Sheet1.Select
    With ActiveSheet.PageSetup
    .RightFooter = "&6" & str
    End With
    End Sub

    Sub Procedure2()
    ********
    Sheet1.Select
    With ActiveSheet.PageSetup
    .LeftFooter = "&6" & str
    End With
    End Sub

    Again, one or the other works, but not both.

    "Bob Phillips" wrote:

    > If you show us the cod we might have.
    >
    > --
    >
    > HTH
    >
    > RP
    > (remove nothere from the email address if mailing direct)
    >
    >
    > "Keith" <[email protected]> wrote in message
    > news:[email protected]...
    > > I have an application where a macro adds left and right footers. However,
    > > once the code assigns the left footer, the macro generates an error saying
    > > "Unable to set the RightFooter property of PageSetup Class."
    > >
    > > If the right footer is assigned first, the same error is genearted for the
    > > left footer.
    > >
    > > Any insights?

    >
    >
    >


  4. #4
    Bob Phillips
    Guest

    Re: macro that adds left and right footers

    Is the use of Str that is the problem, as this is a VBA function.

    --

    HTH

    RP
    (remove nothere from the email address if mailing direct)


    "Keith" <[email protected]> wrote in message
    news:[email protected]...
    > here is the code:
    >
    > Sub Procedure1()
    > ********
    > Sheet1.Select
    > With ActiveSheet.PageSetup
    > .RightFooter = "&6" & str
    > End With
    > End Sub
    >
    > Sub Procedure2()
    > ********
    > Sheet1.Select
    > With ActiveSheet.PageSetup
    > .LeftFooter = "&6" & str
    > End With
    > End Sub
    >
    > Again, one or the other works, but not both.
    >
    > "Bob Phillips" wrote:
    >
    > > If you show us the cod we might have.
    > >
    > > --
    > >
    > > HTH
    > >
    > > RP
    > > (remove nothere from the email address if mailing direct)
    > >
    > >
    > > "Keith" <[email protected]> wrote in message
    > > news:[email protected]...
    > > > I have an application where a macro adds left and right footers.

    However,
    > > > once the code assigns the left footer, the macro generates an error

    saying
    > > > "Unable to set the RightFooter property of PageSetup Class."
    > > >
    > > > If the right footer is assigned first, the same error is genearted for

    the
    > > > left footer.
    > > >
    > > > Any insights?

    > >
    > >
    > >




  5. #5
    Keith
    Guest

    Re: macro that adds left and right footers

    Thanks for you help. Replacing the use of str did not work. It was actually
    the string itself, which was:
    ..leftfooter = "-- = A" & vbcr & "--- = B"

    for some reason the footer property does not like the the dashes and equal
    sign.

    "Bob Phillips" wrote:

    > Is the use of Str that is the problem, as this is a VBA function.
    >
    > --
    >
    > HTH
    >
    > RP
    > (remove nothere from the email address if mailing direct)
    >
    >
    > "Keith" <[email protected]> wrote in message
    > news:[email protected]...
    > > here is the code:
    > >
    > > Sub Procedure1()
    > > ********
    > > Sheet1.Select
    > > With ActiveSheet.PageSetup
    > > .RightFooter = "&6" & str
    > > End With
    > > End Sub
    > >
    > > Sub Procedure2()
    > > ********
    > > Sheet1.Select
    > > With ActiveSheet.PageSetup
    > > .LeftFooter = "&6" & str
    > > End With
    > > End Sub
    > >
    > > Again, one or the other works, but not both.
    > >
    > > "Bob Phillips" wrote:
    > >
    > > > If you show us the cod we might have.
    > > >
    > > > --
    > > >
    > > > HTH
    > > >
    > > > RP
    > > > (remove nothere from the email address if mailing direct)
    > > >
    > > >
    > > > "Keith" <[email protected]> wrote in message
    > > > news:[email protected]...
    > > > > I have an application where a macro adds left and right footers.

    > However,
    > > > > once the code assigns the left footer, the macro generates an error

    > saying
    > > > > "Unable to set the RightFooter property of PageSetup Class."
    > > > >
    > > > > If the right footer is assigned first, the same error is genearted for

    > the
    > > > > left footer.
    > > > >
    > > > > Any insights?
    > > >
    > > >
    > > >

    >
    >
    >


+ 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