Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 270
Default Don't want date to update

In cell A10 I have the formula =Today() which is fine, but how can I code
it so that when the file is saved the value in A10 at the next opening
doesn't update. (I know to use the "BeforeClose" sub procedure). In other
words it retains the date that the file was saved.
Sandy


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Don't want date to update

Sandy

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
ActiveSheet.Range("A10").Value = Format(Date, "dddd, mmmm dd, yyyy")
End Sub


Gord Dibben Excel MVP

On Thu, 24 Nov 2005 22:50:54 -0000, "Sandy"
wrote:

In cell A10 I have the formula =Today() which is fine, but how can I code
it so that when the file is saved the value in A10 at the next opening
doesn't update. (I know to use the "BeforeClose" sub procedure). In other
words it retains the date that the file was saved.
Sandy


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 270
Default Don't want date to update

Excellent Gord thank you.
Sandy

"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
Sandy

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
ActiveSheet.Range("A10").Value = Format(Date, "dddd, mmmm dd, yyyy")
End Sub


Gord Dibben Excel MVP

On Thu, 24 Nov 2005 22:50:54 -0000, "Sandy"

wrote:

In cell A10 I have the formula =Today() which is fine, but how can I
code
it so that when the file is saved the value in A10 at the next opening
doesn't update. (I know to use the "BeforeClose" sub procedure). In other
words it retains the date that the file was saved.
Sandy




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 265
Default Don't want date to update

in the auto_close procedure make a code that save the value of A10 and paste
it on A9 (range("a9").value=range("a10").value) then, in a auto_open
procedure write:
if Range("A9")<"" then
Range("a9").select
selection.cut
'and then paste it in A10
else
Range("a10").formula="=today()"
end if
HTH
"Sandy" wrote:

In cell A10 I have the formula =Today() which is fine, but how can I code
it so that when the file is saved the value in A10 at the next opening
doesn't update. (I know to use the "BeforeClose" sub procedure). In other
words it retains the date that the file was saved.
Sandy



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
Clarification - how to automatically update cells with a date and date range Bekki Excel Discussion (Misc queries) 1 August 31st 10 03:18 AM
Automatically update a cell with a date based on anther cells date GPR GUY Excel Discussion (Misc queries) 2 November 3rd 08 03:57 PM
input a date or update it based on date in another cell Doug P New Users to Excel 1 July 18th 07 11:25 PM
How to update a cell if a specific date is included in a date rang mgavidia Setting up and Configuration of Excel 2 October 8th 05 12:53 AM
Date update on data update Chris Thompson Excel Programming 3 August 22nd 03 06:40 PM


All times are GMT +1. The time now is 02:12 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"