Hi,
I would like to add a horizontal line above my footer. Does someone know how to do this?
Thanks.
I would like to add a horizontal line above my footer. Does someone know how to do this?
Thanks.
Code:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
'Calculate
Dim booIsSaved As Boolean
Dim strDatInfo As String
With ThisWorkbook
booIsSaved = .Saved
If .Path <> "" Then
strDatInfo = _
.BuiltinDocumentProperties("Last save time")
Else
strDatInfo = "not saved"
End If
If Year(Now()) = 2011 Then
ActiveSheet.PageSetup.LeftFooter = "&08" & "Copyright © " & Year(Now) & " | Last saved: " & strDatInfo & Chr(10) & "&Z&F"
Else
ActiveSheet.PageSetup.LeftFooter = "&08" & "Copyright © 2011-" & Year(Now) & " | Last saved: " & strDatInfo & Chr(10) & "&Z&F"
End If
.Saved = booIsSaved
ActiveSheet.PageSetup.RightFooter = _
"&08" & "Page " & "&P" & " of " & "&N" & Chr(10)
End With
End Sub