Date open file with date saved

  • Thread starter Thread starter Rita
  • Start date Start date
R

Rita

I am using the =today function in one of my spreadsheets. Is there anyway to
make it show the date that it was saved when you reopen it? For instance, it
is an invoice. If I pull it up again the next week, I want to see what the
actual date that it was sold, not today's date. Today's date shows
automatically.

Thanks for your help.
 
Pretty well stuck with VBA or copy/paste special>values.

TODAY() will always update.

Something like this in your Thisworkbook module.

Private Sub Workbook_BeforeSave(ByVal _
SaveAsUI As Boolean, Cancel As Boolean)
With Sheets("Sheet1").Range("A1")
If .Value = "" Then
.Value = "Date sold " & Date
End If
End With
End Sub

Will add the sold date first time the workbook is saved and remain static as
long as there is an entry in A1


Gord Dibben MS Excel MVP
 
I tried the copy/paste special values.... that was much simplier for me than
VB code. THANK YOU!!! It works great. :)
 
Back
Top