Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Custom Footer
What do I use to add the directory as a custom footer in the View/Header
Footer...I've used &[Path] and that doesn't work. I see a button to add the file name...that's easy...but I can't get the directory on there. -- Gator |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Custom Footer
Hi,
When you say &[Path] doesn't work, do you mean it doesn't put in the path or do you mean it puts in more than you need? 1. If #1 then you probably need to save the file first 2. If #2 then you need to write VBA code and add it to the Before Print event of the thisWorkbook object. -- Thanks, Shane Devenshire "Gator" wrote: What do I use to add the directory as a custom footer in the View/Header Footer...I've used &[Path] and that doesn't work. I see a button to add the file name...that's easy...but I can't get the directory on there. -- Gator |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Custom Footer
In what particular way does &[Path] not work? What do you see there when
you do a print preview, as it works for me? Which version of Excel are you using? On mine (Excel 2003) the button to add path and file is immediately to the left of the button to add just the file reference. -- David Biddulph "Gator" wrote in message ... What do I use to add the directory as a custom footer in the View/Header Footer...I've used &[Path] and that doesn't work. I see a button to add the file name...that's easy...but I can't get the directory on there. -- Gator |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Custom Footer
Hi again,
The code if you want that is Private Sub Workbook_BeforePrint(Cancel As Boolean) ActiveSheet.PageSetup.LeftFooter = ActiveWorkbook.Path End Sub -- Thanks, Shane Devenshire "Gator" wrote: What do I use to add the directory as a custom footer in the View/Header Footer...I've used &[Path] and that doesn't work. I see a button to add the file name...that's easy...but I can't get the directory on there. -- Gator |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Custom Footer
I should be more specific...I am using Excel 2000. I see where code can be
used. Is there some code I can use that will work automatically in any workbook? Or would it be easier to use macro, and how would you implement that macro -- Gator "ShaneDevenshire" wrote: Hi, When you say &[Path] doesn't work, do you mean it doesn't put in the path or do you mean it puts in more than you need? 1. If #1 then you probably need to save the file first 2. If #2 then you need to write VBA code and add it to the Before Print event of the thisWorkbook object. -- Thanks, Shane Devenshire "Gator" wrote: What do I use to add the directory as a custom footer in the View/Header Footer...I've used &[Path] and that doesn't work. I see a button to add the file name...that's easy...but I can't get the directory on there. -- Gator |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
Custom Footer
[Path] was added in Excel 2002.
-- Jim "Gator" wrote in message ... |I should be more specific...I am using Excel 2000. I see where code can be | used. Is there some code I can use that will work automatically in any | workbook? Or would it be easier to use macro, and how would you implement | that macro | -- | Gator | | | "ShaneDevenshire" wrote: | | Hi, | | When you say &[Path] doesn't work, do you mean it doesn't put in the path or | do you mean it puts in more than you need? | | 1. If #1 then you probably need to save the file first | 2. If #2 then you need to write VBA code and add it to the Before Print | event of the thisWorkbook object. | | | -- | Thanks, | Shane Devenshire | | | "Gator" wrote: | | What do I use to add the directory as a custom footer in the View/Header | Footer...I've used &[Path] and that doesn't work. I see a button to add the | file name...that's easy...but I can't get the directory on there. | -- | Gator |
#7
Posted to microsoft.public.excel.misc
|
|||
|
|||
Custom Footer
Is there a way to set this code where is will automatically work in Excel
anytime or do I have add it to each workbook I want to use it in. Also, do I need to assign the code to a macro? -- Gator "ShaneDevenshire" wrote: Hi again, The code if you want that is Private Sub Workbook_BeforePrint(Cancel As Boolean) ActiveSheet.PageSetup.LeftFooter = ActiveWorkbook.Path End Sub -- Thanks, Shane Devenshire "Gator" wrote: What do I use to add the directory as a custom footer in the View/Header Footer...I've used &[Path] and that doesn't work. I see a button to add the file name...that's easy...but I can't get the directory on there. -- Gator |
#8
Posted to microsoft.public.excel.misc
|
|||
|
|||
Custom Footer
The thisWorkbook object is unique for each workbook. You could add the code
to a default workbook and then all future workbooks would have it, but that would not go back to previously created workbooks. I suppose you can write a XLA that traps the print command in Excel and applies the Path command to the current workbook, but I haven't tried it. -- Cheers, Shane Devenshire "Gator" wrote: Is there a way to set this code where is will automatically work in Excel anytime or do I have add it to each workbook I want to use it in. Also, do I need to assign the code to a macro? -- Gator "ShaneDevenshire" wrote: Hi again, The code if you want that is Private Sub Workbook_BeforePrint(Cancel As Boolean) ActiveSheet.PageSetup.LeftFooter = ActiveWorkbook.Path End Sub -- Thanks, Shane Devenshire "Gator" wrote: What do I use to add the directory as a custom footer in the View/Header Footer...I've used &[Path] and that doesn't work. I see a button to add the file name...that's easy...but I can't get the directory on there. -- Gator |
#9
Posted to microsoft.public.excel.misc
|
|||
|
|||
Custom Footer
Right-click on the Excel Icon left of "File" on the menubar.
Copy/paste Shane's code into that module. Change nothing.......it is event code, not a macro. FileSave As Type: scroll down to Excel Template(*.XLT) and select. Name your workbook "BOOK"(no quotes). Excel will add the .XLT to save as BOOK.XLT. Store this workbook in the XLSTART folder usually located at........ C:\Documents and Settings\username\Application Data\Microsoft\Excel\XLSTART This will be the default workbook for FileNew or the Toolbar button FileNew or CTRL + n WARNING................Do not use FileNew...Blank Workbook or you will get the Excel default workbook. More can be found on this in Help under "templates"(no quotes). NOTE: Existing workbooks are not affected by these settings. To change those you could make Shane's code into a macro and store in your Personal.xls. Sub PathInFooter() ActiveSheet.PageSetup.RightFooter = ActiveWorkbook.FullName & " " & _ ActiveSheet.Name & " " & Application.UserName & " " & Date End Sub Delete the bits you don't want. Gord Dibben Excel MVP On Wed, 23 Jan 2008 13:54:01 -0800, Gator wrote: Is there a way to set this code where is will automatically work in Excel anytime or do I have add it to each workbook I want to use it in. Also, do I need to assign the code to a macro? |
#10
Posted to microsoft.public.excel.misc
|
|||
|
|||
Custom Footer
You may want to try John Walkenbach's AddPath addin:
http://j-walk.com/ss/excel/files/addpath.htm Including the version of excel that you're using is always a good idea <vbg. Gator wrote: I should be more specific...I am using Excel 2000. I see where code can be used. Is there some code I can use that will work automatically in any workbook? Or would it be easier to use macro, and how would you implement that macro -- Gator "ShaneDevenshire" wrote: Hi, When you say &[Path] doesn't work, do you mean it doesn't put in the path or do you mean it puts in more than you need? 1. If #1 then you probably need to save the file first 2. If #2 then you need to write VBA code and add it to the Before Print event of the thisWorkbook object. -- Thanks, Shane Devenshire "Gator" wrote: What do I use to add the directory as a custom footer in the View/Header Footer...I've used &[Path] and that doesn't work. I see a button to add the file name...that's easy...but I can't get the directory on there. -- Gator -- Dave Peterson |
#11
Posted to microsoft.public.excel.misc
|
|||
|
|||
Custom Footer
Hi Gator,
I have a way for you to add this code to all your workbooks, new and old. Question is do you really want that? If I write the code you need it will be in every file you open, new or old. Let me know. -- Thanks, Shane Devenshire "Gator" wrote: What do I use to add the directory as a custom footer in the View/Header Footer...I've used &[Path] and that doesn't work. I see a button to add the file name...that's easy...but I can't get the directory on there. -- Gator |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Custom Footer | Excel Discussion (Misc queries) | |||
Custom Footer for each page | Excel Worksheet Functions | |||
custom vertical footer? | Excel Worksheet Functions | |||
How do i get page 1 of 1 in a custom Footer | New Users to Excel | |||
Custom footer | New Users to Excel |