VBA How to set the header and footers of an excel worksheet
Sub HeaderFooter()
Sheet1.PageSetup.LeftHeader = "Howdy"
Sheet1.PageSetup.CenterHeader = "Do"
Sheet1.PageSetup.RightHeader = "Y'all"
Sheet1.PageSetup.LeftFooter = Application.Path
Sheet1.PageSetup.CenterFooter = Date
Sheet1.PageSetup.RightFooter = Environ("UserName")
End Sub
"John Baker" wrote:
Can anyone tell me the syntax to set the header and footer values on a
worksheet using VBA?
Thanks in advance.
John Baker
|