#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 66
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,344
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,344
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 66
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 533
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 66
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,344
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,344
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Footer Andrew Mackenzie Excel Discussion (Misc queries) 3 November 10th 06 12:20 PM
Custom Footer for each page NAVEEN Excel Worksheet Functions 0 February 21st 06 11:04 AM
custom vertical footer? Joseph Excel Worksheet Functions 0 June 28th 05 05:34 AM
How do i get page 1 of 1 in a custom Footer Den New Users to Excel 3 April 9th 05 05:55 PM
Custom footer Chrissy New Users to Excel 2 December 3rd 04 09:01 PM


All times are GMT +1. The time now is 05:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"