File path in footer

  • Thread starter Thread starter Eric
  • Start date Start date
E

Eric

Hello,

I am trying to have the path + filename of my spreadsheet to appear
automatically in the footer. I can put the page number, the filename, the
sheet name, etc... but I can't figure out the "field code" for the path.

Can you help?

Thank you.

Eric.
 
Hi Eric!

This is built into Excel 2002 and 2003



Put the following in the footer:
&[Path]&[File]



But for Excel 97 and Excel 2000



You need a macro (or just type the full name in):



This subroutine which must be put in ThisWorkbook module puts the path
and workbook name in the footer.



Private Sub Workbook_BeforePrint(Cancel As Boolean)

ActiveSheet.PageSetup.LeftFooter = ActiveWorkbook.FullName

End Sub


--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 

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

Similar Threads


Back
Top