PATH SHOW UP - HOW DO I DO THAT

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to have the path show up on my excel documents - how do i do this?
in word you can just put this in the footer... but, excel doesn't seem to
have this capability...
 
from a post by Gord

Sub Path_All_Sheets()
Set wkbktodo = ActiveWorkbook
For Each ws In wkbktodo.Worksheets
ws.PageSetup.RightFooter = ActiveWorkbook.FullName & " " & Chr(13) _
& Application.UserName & " " & Date
Next
End Sub


Sub PathInFooter()
ActiveSheet.PageSetup.RightFoo­ter = ActiveWorkbook.FullName & " " & _
ActiveSheet.Name & " " & Application.UserName & " " & Date
End Sub


You could also put the code into Thisworkbook BeforePrint


Gord Dibben Excel MVP
 
In addition to Don's excellent reply, which actually puts the information in
the footer, you can use =CELL("filename"), which will put the path in a cell
in your worksheet. If your worksheet is just one page, this might be
acceptable.
 
Hi Debra, The easiest way I know of is File Pagesetup > header and footer.
Use the 'file folder icon ( &[path]&[file] ). You can also add the sheet tab
name there too.
 
Debra

Versions 2002 and 2003 have the path and name options in the header/footer
setup. Earlier versions require the VBA posted by Don G.

SVC

Try a little experiment with your formula.

Enter it in a cell to see path\filename and sheetname.

Leave that workbook open then open another workbook.

Hit F9 to calculate then go back to first workbook.

You will see your filename has changed to second workbook filename and
sheetname.

To prevent this use =CELL("filename",A1)


Gord Dibben Excel MVP
 
Interesting. Thanks for the tip. I work with Excel 2000 at work and Excel
2003 at home. Will be upgrading to Office 2003 at work soon, but greatly
appreciate the feedback.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top