MrExcel Publishing
Your One Stop for Excel Tips & Solutions

Coding a path in the footer.

Posted by matt on January 08, 2001 1:03 PM

This is a question I had a few days ago with the answer
that a kindly reader of the message board returned:

:: Hello,
:: I would like to include the current path and file name
:: in some of my documents. The filename is pretty easy,
:: but I'm stumped with regard to the path. Any suggestions.

:: Thanks,
:: matt

:With Application.ActiveSheet
:.PageSetup.LeftFooter = "&8Path: &B" & .path
:End With

:I think I use something like this in my BeforePrint event - works great haven't touched it in months

:Welcome, Rickey

Forgive me because I am quite new to VB. Where do I
put this coding? Do I have to declare BeforePrint as
a subroutine in the VBA editor? If I have footer placed
manually in the page setup menu, will the footer
interfere with the coding?


Posted by keekee on January 30, 2001 11:52 AM

I was looking for the same thing. I found it in the message archives posted by Ivan. it is:

Sub UpDateFooter ()
ActiveSheet.PageSetup.LeftFooter = ActiveWorkbook.FullName
End Sub

Just run this macro. it works.