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
Bernard Liengme - 04 Sep 2007 02:20 GMT
Try here: http://www.mrexcel.com/tip055.shtml
best wishes

Signature
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email
>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
[quoted text clipped - 10 lines]
>
> pat
Dave Peterson - 04 Sep 2007 03:47 GMT
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)
> 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
[quoted text clipped - 7 lines]
>
> pat

Signature
Dave Peterson