On 2002-05-04 16:59, Nimrod wrote:
If you want it to auto update EACH time you make a cell change you can do it with these two lines of code
DateTimeValue = Date & " " & Time
If Not (Target = DateTimeValue) Then Range("A1").Value = DateTimeValue
Put these two lines of code in the "Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)" of your workbook.
This is a built in routine that runs every time you modify the workbook. To find the procedure: 1)open up the procedure editor , 2)select the "ThisWorkBook" object from the pane of the editor, 3)Select "workbook" from editors drop downs and select "sheetchange".
4) add the two lines of code.
After this everytime you change any cell in the workbook the Date will change automatically.
Note: The cell "A1" can be changed to any cell that you want the date in.