filename and path in footer

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?
 
D

Debbie K.

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.
 
J

J.E. McGimpsey

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top