![]() |
Date open file with date saved
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. |
Date open file with date saved
Pretty well stuck with VBA or copy/paste specialvalues.
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 On Wed, 22 Apr 2009 15:26:01 -0700, Rita wrote: 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. |
Date open file with date saved
I am really new to VB code. Do I put this in the cell I want it in or put it
on the VB code screen? (mine says general and declarations) What do I change in your code, only the Range? I want the date results in W4. Thanks again. "Gord Dibben" wrote: Pretty well stuck with VBA or copy/paste specialvalues. 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 On Wed, 22 Apr 2009 15:26:01 -0700, Rita wrote: 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. |
Date open file with date saved
I tried the copy/paste special values.... that was much simplier for me than
VB code. THANK YOU!!! It works great. :) "Gord Dibben" wrote: Pretty well stuck with VBA or copy/paste specialvalues. 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 On Wed, 22 Apr 2009 15:26:01 -0700, Rita wrote: 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. |
All times are GMT +1. The time now is 10:27 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com