From: Cynergy on 23 Feb 2010 11:49 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 23 Feb 2010 15:14 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?
|
Pages: 1 Prev: Excel 2007 Copy Worksheet Problem Next: Number formula (2007) |