full file path in the footer


Posted by John S. on March 21, 2001 8:24 AM

How do I get the full file path name in the footer of a spreadsheeet or somewhere on a chart sheet

Posted by Bruce on March 21, 2001 8:57 AM


Try this macro:

Sub FileInFooter()
ActiveSheet.PageSetup.LeftFooter = ActiveWorkbook.FullName
End Sub



Posted by tom venn on March 21, 2001 5:09 PM

this will give the full path

Sub Macro1()
ActiveCell.SpecialCells(xlLastCell).Select
ActiveCell.Offset(1, 0).Range("A1").Select
Selection.End(xlToLeft).Select
Selection.End(xlToLeft).Select
Selection.End(xlToLeft).Select
Selection.End(xlToLeft).Select
ActiveCell.FormulaR1C1 = "=CELL(""filename"")"
Calculate
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
ActiveSheet.PageSetup.CenterFooter = "&""Antique Olive,Bold""&8 " & ActiveCell.Value
Selection.ClearContents
End Sub


cheers,

- thomas