Template with date and time stamp

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Has anyone created a template where the static date and time will automatically be included in a cell? I know with the NOW() function, the date and time will continually be updated.
 
If you want a static date entered in a cell dynamically (like when a
workbook is initially opened) you'd have to use a macro. For instance you
could put this in the ThisWorkbook module of the template's VB project:

Private Sub Workbook_Open()
If Range("A1").Value = 0 Then Range("A1").Value = Date
End Sub
 
Back
Top