Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I would like to enter a date in the header (or footer) of my Excel
spreadsheet. However, I want it to be the date the file was last saved, not today's date. Is there a way to do this? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Sub Last_Saved_Footer()
'Private Sub Workbook_BeforePrint(Cancel As Boolean) 'alternate method Dim wkSht As Worksheet For Each wkSht In ThisWorkbook.Worksheets wkSht.PageSetup.RightFooter = "&8Last Saved : " & _ Format(ThisWorkbook.BuiltinDocumentProperties("Las t Save Time"), _ "yyyy-mmm-dd hh:mm:ss") Next wkSht End Sub Gord Dibben MS Excel MVP On Tue, 22 Jul 2008 12:46:10 -0700, GypsyHarper wrote: I would like to enter a date in the header (or footer) of my Excel spreadsheet. However, I want it to be the date the file was last saved, not today's date. Is there a way to do this? |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi GypsyHarper
See http://www.rondebruin.nl/print.htm#Last -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "GypsyHarper" wrote in message ... I would like to enter a date in the header (or footer) of my Excel spreadsheet. However, I want it to be the date the file was last saved, not today's date. Is there a way to do this? |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
The code worked splendidly in my test file. But when I went to put it in the
file I actually want to use it in, the "ThisWorkbook" icon does not appear, even after I saved a copy as a Macro Enabled file (I'm using Excel 2007, by the by). Any ideas? "Ron de Bruin" wrote: Hi GypsyHarper See http://www.rondebruin.nl/print.htm#Last -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "GypsyHarper" wrote in message ... I would like to enter a date in the header (or footer) of my Excel spreadsheet. However, I want it to be the date the file was last saved, not today's date. Is there a way to do this? |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
the "ThisWorkbook" icon does not appear,
??? If you not see it see this page http://www.rondebruin.nl/code.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "GypsyHarper" wrote in message ... The code worked splendidly in my test file. But when I went to put it in the file I actually want to use it in, the "ThisWorkbook" icon does not appear, even after I saved a copy as a Macro Enabled file (I'm using Excel 2007, by the by). Any ideas? "Ron de Bruin" wrote: Hi GypsyHarper See http://www.rondebruin.nl/print.htm#Last -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "GypsyHarper" wrote in message ... I would like to enter a date in the header (or footer) of my Excel spreadsheet. However, I want it to be the date the file was last saved, not today's date. Is there a way to do this? |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Yes, I see the project explorer. The project has no folders underneath it -
it's not just collapsed. There's no plus sign, and when I double click on the project is says it's locked. "Ron de Bruin" wrote: the "ThisWorkbook" icon does not appear, ??? If you not see it see this page http://www.rondebruin.nl/code.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "GypsyHarper" wrote in message ... The code worked splendidly in my test file. But when I went to put it in the file I actually want to use it in, the "ThisWorkbook" icon does not appear, even after I saved a copy as a Macro Enabled file (I'm using Excel 2007, by the by). Any ideas? "Ron de Bruin" wrote: Hi GypsyHarper See http://www.rondebruin.nl/print.htm#Last -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "GypsyHarper" wrote in message ... I would like to enter a date in the header (or footer) of my Excel spreadsheet. However, I want it to be the date the file was last saved, not today's date. Is there a way to do this? |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I think your VBA project is password protected
Does it ask you for a password ? -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "GypsyHarper" wrote in message ... Yes, I see the project explorer. The project has no folders underneath it - it's not just collapsed. There's no plus sign, and when I double click on the project is says it's locked. "Ron de Bruin" wrote: the "ThisWorkbook" icon does not appear, ??? If you not see it see this page http://www.rondebruin.nl/code.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "GypsyHarper" wrote in message ... The code worked splendidly in my test file. But when I went to put it in the file I actually want to use it in, the "ThisWorkbook" icon does not appear, even after I saved a copy as a Macro Enabled file (I'm using Excel 2007, by the by). Any ideas? "Ron de Bruin" wrote: Hi GypsyHarper See http://www.rondebruin.nl/print.htm#Last -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "GypsyHarper" wrote in message ... I would like to enter a date in the header (or footer) of my Excel spreadsheet. However, I want it to be the date the file was last saved, not today's date. Is there a way to do this? |
#8
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Press <Alt + F11 to open the Visual Basic Editor.
In the upper left, double click the ThisWorkbookIcon to open the workbook module. In the code window on the right, drop down the left combo-box at the top and change selection to WORKBOOK, and then drop down the right combo-box at the top and change the selection to BEFORESAVE. Enter the code that appears betwen the Private Sub Line and the End Sub Line. Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Dim ws As Worksheet For Each ws In ThisWorkbook.Worksheets With ws.PageSetup .LeftFooter = "Last Save Time: &T" .RightFooter = "Last Save Date: &D" End With Next ws Set ws = Nothing End Sub Everytime you save the workbook the save time is posted to the left foooter of each worksheet and the save date to the right footer of each worksheet. Save the file to test drive it and then do a print preview. -- Kevin Backmann "GypsyHarper" wrote: I would like to enter a date in the header (or footer) of my Excel spreadsheet. However, I want it to be the date the file was last saved, not today's date. Is there a way to do this? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Is it possible to save a custom header or footer? | Excel Discussion (Misc queries) | |||
How to save a custom made header&footer | Excel Discussion (Misc queries) | |||
Save a header or Footer | Excel Discussion (Misc queries) | |||
Date formula for footer/header | Excel Discussion (Misc queries) | |||
How to save a custom header/footer on ea. sheet of a workbook? | Excel Worksheet Functions |