rjplante
Well-known Member
- Joined
- Oct 31, 2008
- Messages
- 574
- Office Version
- 365
- Platform
- Windows
I would like to format my footer using VBA. I have my code listed below but I get a "Compile Error: Invalid Qualifier" and it highlights the Ftr in the first line of the With statement "With Ftr.Font". My code is below. How do I fix this?
Thanks for the help!
Code:
Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Dim Ftr As String
ActiveSheet.PageSetup.RightFooter = "Machine: " & Sheets("Safety").Range("M1").Value
Ftr = ActiveSheet.PageSetup.RightFooter.Text
With Ftr.Font
.Name = "Calibri"
.FontStyle = "Bold"
.Size = 18
End With
End Sub
Thanks for the help!