ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   PATH SHOW UP - HOW DO I DO THAT (https://www.excelbanter.com/excel-worksheet-functions/30684-path-show-up-how-do-i-do.html)

debra

PATH SHOW UP - HOW DO I DO THAT
 
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...

Don Guillett

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



--
Don Guillett
SalesAid Software

"debra" wrote in message
...
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...




SVC

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.

"debra" wrote:

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...


Casey55

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.


"SVC" wrote:

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.

"debra" wrote:

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...


Gord Dibben

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

On Tue, 14 Jun 2005 10:49:02 -0700, SVC wrote:

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.

"debra" wrote:

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...



SVC

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.

"Gord Dibben" wrote:

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

On Tue, 14 Jun 2005 10:49:02 -0700, SVC wrote:

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.

"debra" wrote:

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...





All times are GMT +1. The time now is 07:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com