How do I put a full path name in the header or trailer

M

Michael L.

I can put a file name in the trailer but I can't seem to
get command to automatically put the path.
 
P

Phil C

Michael

There is a button for path & file (codes as &[Path]&[File]) if you select
custom header in XL2002, but I don't think this was available in previous
versions, in which case you need a macro:

Sub PathInFooter()
ActiveSheet.PageSetup.RightFooter = ActiveWorkbook.FullName & " " & _
Application.UserName & " " & Date
End Sub

HTH, Phil
 

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