Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File Path in Excel 97

Status
Not open for further replies.

drm184

MIS
May 25, 2001
35
US
Can anyone tell me how to add the file path and name to the footer (or anywhere) on a worksheet so that it shows up c:\Temp\Practice.xls? I know I've done this before, and for some reason I can't remember how to do it. Thanks for the help.
 
This code example puts the file path and name in the left header ... substitute center, right, and footer where applicable.



sub your_file_path()

With ActiveSheet.PageSetup
.LeftHeader = ActiveWorkbook.Path + "\" + ActiveWorkbook.Name
End With

end sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top