![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Location: Michigan, USA
Posts: 17
|
Hi,
I am going to set a file path in the footer. Once save the file into another folder the file path will be changed to the current folder. Please teach me if you know how to do it. Thank you very much. ssunchen |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Mar 2002
Location: Kobe, Japan
Posts: 1,420
|
Hi,
Pls try this. ActiveSheet.PageSetup.LeftFooter = ActiveWorkbook.Path |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Location: Dog Beach, Florida. Yeaahh!
Posts: 4,038
|
Better yet, replace "Path" with "FullName". This will give the name of the file as well as the path.
Only trouble with this is that, when you rename the file and/or save it to another folder, it does not automatically change the path in the footer. But not to worry - place the macro below into your PERSONAL macro workbook and just run it every time you save to another folder or with another file name: Sub InsertPathInFooter() ActiveSheet.PageSetup.LeftFooter = ActiveWorkbook.FullName End Sub
__________________
Barry- Photo Restoration/Enhancement http://www.smiledogproductions.com click below for detour
|
|
|
|
|
|
#4 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Other option....place your code in the
Workbook before save event.... |
|
|
|
|
|
#5 |
|
Board Regular
Join Date: Feb 2002
Location: Dog Beach, Florida. Yeaahh!
Posts: 4,038
|
Ivan, how do I do that?
__________________
Barry- Photo Restoration/Enhancement http://www.smiledogproductions.com click below for detour
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|