Date but not TODAY() ...

  • Thread starter Thread starter Michelle
  • Start date Start date
M

Michelle

Hi all,

I need a little macro for a worksheet template that
enters the date into a cell the first time the worksheet
is created/opened from the template but then preserves
the original date thereafter ... in other words I cannot
use the TODAY() function as it changes the date as the
date progresses.

Thanks in advance ...

Michelle
 
Michelle,

Checking to see if the first cell has a date value, if not then set it to
today

Private Sub Workbook_Open()
If Not IsDate(Sheet1.Cells(1).Value) Then Sheet1.Cells(1).Value = Date
End Sub

Rob
 
Back
Top