Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 64
Default 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.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default 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.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 64
Default 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.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 64
Default 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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I capture the last date a file was saved in the footer DNader Excel Discussion (Misc queries) 3 November 18th 08 02:27 PM
Date modified changes when file not saved BAC Excel Discussion (Misc queries) 5 January 3rd 08 12:49 PM
Excel should have a function for last date and time file was saved fwbuckley Excel Worksheet Functions 11 August 15th 07 11:04 PM
how do I show last date file saved? Pete Excel Worksheet Functions 1 February 17th 05 06:25 PM
store file saved date in cell Martin Connelly Excel Worksheet Functions 1 November 16th 04 01:32 PM


All times are GMT +1. The time now is 05:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"