Insert file name into header

P

Patrick

I need a macro or something that automatically insert the file name of the
excel file into the header or footer, does not matter which, i dont need the
directory path.

Either this or automatically insert into the header or footer the contents
of a specific cell in the worksheet. the cell address will never change., if
i create a new worksheet, same cell address needs to go into the header

thanks

pat
 
D

Dave Peterson

The ability to add the filename was added in xl2002. If you're using xl2k or
below, you can use a macro like Bernard suggests to put the filename in the
header/footer.

If you want to put the filename in a cell, you could use a formula:
http://contextures.com/xlfaqFun.html#SheetName
(From Debra Dalgleish's site)
 

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