Date open file with date saved

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.
 
G

Gord Dibben

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
 
R

Rita

I tried the copy/paste special values.... that was much simplier for me than
VB code. THANK YOU!!! It works great. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top