From: Cynergy on
I know how to get the filename into a header/footer. Is there any way to get
the filename in the header/footer WITHOUT showing the filename extension?
From: מיכאל (מיקי) אבידן on
1) Click on 'My Computer' > 'Tools' > 'Folder Options...' > View tab and
check the option "Hide extensions for known files".
OR:
2) If you don't want to change the way your computer displays file names -
make use of a Macro:
-------------------------------------------------------
Sub Header_FileName_No_Extension()
On Error Resume Next
LFN = InStrRev(ActiveWorkbook.Name, ".")
FN = Left(ActiveWorkbook.Name, LFN - 1)
ActiveSheet.PageSetup.CenterHeader = FN
End Sub
----------------------
Micky



"Cynergy" wrote:

> I know how to get the filename into a header/footer. Is there any way to get
> the filename in the header/footer WITHOUT showing the filename extension?