Share via

VBA Code To Change Font Size Only in Left Footer only

Anonymous
2021-10-12T15:20:36+00:00

Hi,

I currently have a drop down box in excel that populates the left footer on my sheet with addresses as shown below

Sub footer()
ActiveSheet.PageSetup.LeftFooter = Range("UKaddress").Value
End Sub

But i need to define the font size to use for the left footer

any help much appreciated

Adrian

Microsoft 365 and Office | Excel | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Andreas Killer 144.1K Reputation points Volunteer Moderator
2021-10-12T17:36:49+00:00

Sub Footer()
Const FontSize = 8
ActiveSheet.PageSetup.LeftFooter = "&" & FontSize & Range("UKaddress").Value
End Sub

Was this answer helpful?

1 person found this answer helpful.
0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Anonymous
    2021-11-01T13:42:41+00:00

    The code worked, Great

    When i try to set the right and left footer using the same method the code fails.

    Sub FootL()

    Const FontSize = 12

    ActiveSheet.PageSetup.LeftFooter = "&" & FontSize & Range("UKaddress1").Value

    ActiveSheet.PageSetup.RightFooter = "&" & FontSize & Range("UKaddress2").Value

    End Sub

    Any help much appreciated

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2021-10-13T07:33:12+00:00

    Thank you @andreas code work fine

    Was this answer helpful?

    0 comments No comments