View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default 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!