Full path in custom footer. How?

D

Don Wiss

I'm using Excel 97. I know I can put =CELL("filename") in a cell, and then
have a macro assign that to the footer, but is there an & keyword that will
return the full path without this kludge? Knowing that &[File] returns the
file name, I tried words like Filename, Path, and Pathname, but to no
avail.

Don <donwiss at panix.com>.
 
D

Don Wiss

Don Wiss wrote:
I'm using Excel 97. I know I can put =CELL("filename") in a cell, and then
have a macro assign that to the footer, but is there an & keyword that will
return the full path without this kludge? Knowing that &[File] returns the
file name, I tried words like Filename, Path, and Pathname, but to no
avail.
You can download and use this free add-in:

http://j-walk.com/ss/excel/files/addpath.htm

A little overkill. What I forgot to mention is we also want the name of the
sheet after the full filename. Since we generally print using macros I
ended up added these two lines around the printout line.

ActiveSheet.PageSetup.LeftFooter = ActiveWorkbook.FullName & "[" & ActiveSheet.Name & "]"
ActiveSheet.Printout
ActiveSheet.PageSetup.LeftFooter = "&F[&A]"

I set it back to the default, as it is possible for someone to save under a
new name, and then print without the macro. In such cases they would get the
wrong path.

Don <donwiss at panix.com>.
 

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