Hi all
I am using the following code to create headers and footers and it worg\ks great. I got bit and pieces from different Google searches but had no luck getting the date and time to work.
I want to add the date and time to the Right header to appear like this:
11/24/19
2:01 PM
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim ws As Worksheet
For Each ws In Worksheets
ws.PageSetup.LeftFooter = "&20" & "System Layout by: " & _
Worksheets("Cover Sheet").Range("C34").Value
ws.PageSetup.RightFooter = "&20" & "WorkBook created by Russ Keitel" & Chr(13) & _
Worksheets(" ").Range("AL1048562").Value
ws.PageSetup.LeftHeader = "&20" & " " & _
Worksheets(" ").Range("AK1048562").Value
Next ws
End Sub
Thank you!
I am using the following code to create headers and footers and it worg\ks great. I got bit and pieces from different Google searches but had no luck getting the date and time to work.
I want to add the date and time to the Right header to appear like this:
11/24/19
2:01 PM
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim ws As Worksheet
For Each ws In Worksheets
ws.PageSetup.LeftFooter = "&20" & "System Layout by: " & _
Worksheets("Cover Sheet").Range("C34").Value
ws.PageSetup.RightFooter = "&20" & "WorkBook created by Russ Keitel" & Chr(13) & _
Worksheets(" ").Range("AL1048562").Value
ws.PageSetup.LeftHeader = "&20" & " " & _
Worksheets(" ").Range("AK1048562").Value
Next ws
End Sub
Thank you!