![]() |
![]() |
|
|||||||
| 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 |
|
Board Regular
Join Date: Feb 2002
Location: Dog Beach, Florida. Yeaahh!
Posts: 4,038
|
I have the following macro code:
ActiveSheet.PageSetup.LeftFooter = ActiveWorkbook.FullName which inserts the path and filename into the left footer. That's fine, but when I save the same file to another folder, the path in the footer is not changed, and/or if I rename the file, the new name is not returned in the footer. Is there any way to have the footer automatically change under the above conditions? Thanx in advanx. _________________ I used to have delusions that I was a werewolf, but I'm much better noOOOWWWWWWWW! [ This Message was edited by: Barry Katcher on 2002-05-13 12:03 ] |
|
|
|
|
|
#2 | |
|
Board Regular
Join Date: Apr 2002
Posts: 112
|
Quote:
Sub Auto_Close() ActiveSheet.PageSetup.LeftFooter = ActiveWorkbook.FullName End Sub This Sub will run when you close the workbook. It will only modify the activesheet, not every sheet in the workbook. You would have to modify it a bit for that |
|
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Feb 2002
Location: Dog Beach, Florida. Yeaahh!
Posts: 4,038
|
Thanx, Bergy. If I had this macro in my PERSONAL macro workbook, and ran it on all three sheets of any new workbook I opened, would it become a permanent part of that new workbook and run each time I closed that workbook?
__________________
Barry- Photo Restoration/Enhancement http://www.smiledogproductions.com click below for detour
|
|
|
|
|
|
#4 | |
|
Board Regular
Join Date: Apr 2002
Posts: 112
|
Quote:
|
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|