Problem setting left,center footers but not right

MedievalMan

Board Regular
Joined
Dec 14, 2004
Messages
57
I have code that sets the footer:

<code>
Worksheets(wsname).PageSetup.RightFooter = "&""Arial""&" & fontsize & "&U Effective Radius: &U" & EffRad _
& Chr(10) & "&U Piston Diameter: &U" & Pistdiam _
& Chr(10) & "&U Actual Inertia: &U" & ActInert _
& Chr(10) & "&U Actual Wheel Load: &U" & ActWheel _
& Chr(10) & "&U Rolling Radius: &U" & RollRad _
& Chr(10) & Chr(10) & "Page &P of &N"
</code>

Here's my problem: this works when setting the Right Footer, but if I change this too the Left or Center Footer, I get the following error:

"Run-time Error '1004': Unable to set the LeftFooter property of PageSetup Class"

I know I can put line breaks in the center or left footer if I make the footers manually, so what am I missing?

Thanks again.

Matt Lawson
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
I've discovered something:

With the right and center footers,

<code>
Worksheets(wsname).PageSetup.LeftFooter = "&""Arial""&" & fontsize & "&U Brake Type: &U" & "Moretex"
</code>

If I add even 1 more character, it throws up the runtime error.

This is telling me the character limitation is 20, which it shouldn't be, as I can certainly set many more characters manually.

Thanks for any insight,

Matt Lawson
 
Upvote 0
Update:

It appears my problem is that the total limitation for the footers (left, center, and right combined) is 255 characters.

I doubt there is anyway to get around this?

Thanks.

-Matt
 
Upvote 0

Forum statistics

Threads
1,214,642
Messages
6,120,700
Members
448,979
Latest member
DET4492

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top