View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Rob van Gelder[_4_] Rob van Gelder[_4_] is offline
external usenet poster
 
Posts: 1,236
Default Date but not TODAY() ...

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


"Michelle" wrote in message
...
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