ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do I insert 'date modified' for a whole spreadsheet in the foo (https://www.excelbanter.com/excel-programming/355914-how-do-i-insert-date-modified-whole-spreadsheet-foo.html)

nicycle

How do I insert 'date modified' for a whole spreadsheet in the foo
 
I've found some code on the boards about how to have one cell say when
another cell was modified. But I'm looking to have the something ideally in
the header or footer that states "Date Modified: 3/13/2006" for example and
it updates each time any cell is modified in the spreadsheet. I suppose this
might work to if the date inserted in the code was when the spreadsheet was
last saved if that is the only possibility.

Any help is greatly appreciated.

Thanks!

Bob Phillips[_6_]

How do I insert 'date modified' for a whole spreadsheet in the foo
 
Maybe this will do it

Option Explicit

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim ws As Worksheet
For Each ws In Me.Worksheets
ws.PageSetup.LeftHeader = "Date Modified " & _
Format(Date, "dd mmm yyyy")
Next ws
End Sub


This is workbook event code.
To input this code, right click on the Excel icon on the worksheet
(or next to the File menu if you maximise your workbooks),
select View Code from the menu, and paste the code

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"nicycle" wrote in message
...
I've found some code on the boards about how to have one cell say when
another cell was modified. But I'm looking to have the something ideally

in
the header or footer that states "Date Modified: 3/13/2006" for example

and
it updates each time any cell is modified in the spreadsheet. I suppose

this
might work to if the date inserted in the code was when the spreadsheet

was
last saved if that is the only possibility.

Any help is greatly appreciated.

Thanks!





All times are GMT +1. The time now is 02:33 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com