Excel VBA - Setting a default font & size in a macro.

Coventry Deb

New Member
Joined
Oct 19, 2005
Messages
29
I have the following macro for automatically putting the full address of a workbook and the name of the individual spreadsheet , date and time in the footer. What I'm stuck on is to always have a default for the whole of the footer of the font Aerial and size of 8? I've tried various combinations with and without an additional "with selection" etc but haven't managed to crack it. Can anyone help please?

Thanks

Deb

Sub FooterPath()
With ActiveSheet.PageSetup
.LeftFooter = ActiveWorkbook.FullName
.RightFooter = "&A &D &T"
End With
End Sub
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Try:

Code:
Sub FooterPath()
    With ActiveSheet.PageSetup
    .LeftFooter = "&""Arial,Regular""&8" & ActiveWorkbook.FullName
    .RightFooter = "&""Arial,Regular""&8&A &D &T"
    End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,256
Messages
6,123,915
Members
449,132
Latest member
Rosie14

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