Format footers in VBA

mpromney

New Member
Joined
Sep 21, 2017
Messages
6
Hi:


New member. Wondering if someone can help me solve a problem I'm having formatting footers in VBA. Here's is the relevant section of code I'm using:

Code:
With ActiveSheet.PageSetup
    .LeftFooter = "&""Calibri,Regular""&9 &D at &T"
    .CenterFooter = "&""Calibri,Regular""&9 CONFIDENTIAL - For Management Purposes Only"
    .RightFooter = "&""Calibri,Regular""&9 Page: &P"
End With

The worksheet I'm running this macro on is a balance sheet with the above footers already existing, except that they're in Times New Roman font. All I want to do is change the font from Times New Roman to Calibri. When I run the macro and print the results, the left and center footers are in Times New Roman and only the right footer is in Calibri. I must have run the macro 20+ times with all sorts of variations - all with the same frustrating result. What am I doing wrong? TIA for a response.
 
Last edited by a moderator:
I would also add:

Code:
.Zoom = False

to your code.
 
Upvote 0

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.

Forum statistics

Threads
1,223,894
Messages
6,175,254
Members
452,624
Latest member
gregg777

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