Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 262
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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" wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 262
Default 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" wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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" wrote in message
...
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" wrote in message
...
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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 262
Default 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" wrote in message
...
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" wrote in message
...
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
macro that adds formula to replace text Lawribird Excel Worksheet Functions 4 July 3rd 09 09:50 PM
Is there a macro which adds selected/highlighted cells? Ed Excel Worksheet Functions 2 September 28th 05 01:36 PM
Macro that adds then deletes Brian McGuire Excel Programming 3 December 8th 03 11:28 PM
Macro adds 1 to Cell in excel Xispo[_2_] Excel Programming 4 November 12th 03 07:07 PM
Macro which adds new spreadsheets matraxus Excel Programming 0 August 25th 03 10:52 AM


All times are GMT +1. The time now is 03:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"