Folder name in footer

  • Thread starter Thread starter Paul N
  • Start date Start date
Paul,

reprint.

This code, placed in the ThisWorkbook code module, automatically sets the
full name when printing.

Private Sub Workbook_BeforePrint(Cancel As Boolean)
ActiveSheet.PageSetup.LeftFooter = ThisWorkbook.FullName
End Sub


If you just want the path, change FullName to Path.


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
hi Paul
try
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wkSht As Worksheet
For Each wkSht In ActiveWindow.SelectedSheets
With wkSht.PageSetup
.LeftFooter = ThisWorkbook.FullName
End With
Next wkSht
End Sub

HTH
Frank
 
Back
Top