Insert Automatic, Non-Updating Date Stamp
One way:
Put this in your ThisWorkbook code module. Change "A1" to whatever cell
you want the date to be entered in, and modify the date format to suit:
Private Sub Workbook_Open()
With Sheets(1).Range("A1")
If IsEmpty(.Value) Then
.NumberFormat = "dd mmmm yyyy"
.Value = Date
End If
End With
End Sub
Save your template with A1 cleared.
In article . com,
"Ken Zenachon" wrote:
I use an Excel invoice to bill clients.
Currently I have an Invoice Date field which is populated by the
=TODAY() function. That's good. However, if I open the spreadsheet down
the road and accidentally recalculate, the Invoice Date field is
updated with the current date. That's not so good.
Is there a simple macro I can use that Inserts the date when the
document is created and then terminates? Something, I guess, that calls
the TODAY() function and then pops the resulting date value into the
appropriate cell.
I know I can just use CTRL+; to insert the date manually but I'm
shooting for *fewer* things that I can potentially forget when
invoicing.
Thanks,
KZ
|