filename and path in footer

  • Thread starter Thread starter Steve
  • Start date Start date
S

Steve

I'm attempting to insert the path along with the filename
in a footer in Excel. Inserting the filename is easy but
I'm stumped as to how to get the path (i.e.,
c:\programs\excel\...) into the footer as well. Any help?
 
Try this

1.. On the View menu, click Header and Footer.
2.. Click Custom Header or Custom Footer.
3.. Click in the Left section, Center section, or Right section box.
4.. On the row of buttons in the Header or Footer dialog box, click File
Name .
Debbie K.
 
in XL02/03 you can do this directly from the Custom Header/Footer
dialog. For earlier versions, you can use an event macro. Put this
in the ThisWorkbook code module (right-click on the workbook title
bar and choose View Code):


Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim wkSht As Worksheet
For Each wkSht In ActiveWindow.SelectedSheets
wkSht.PageSetup.LeftFooter = ActiveWorkbook.FullName
Next wkSht
End Sub
 
Back
Top