Freeze Time (Now()) ... again

Chartman of the Bored

Board Regular
Joined
Apr 24, 2002
Messages
83
I have a forumula that calculates the Friday of the current week:

=TODAY()-WEEKDAY(TODAY())+6

I'd like to "freeze" the date when someone saves the workbook.

I know this topic has been addressed before. For example:

http://www.mrexcel.com/board/viewtopic.php?topic=14767&forum=2

But I don't want to use a checkbox, as suggested by Tom. And I don't follow Juan Pablo's code, though I do know a bit of VBA (not enough, though).

Thanks in advance for any suggestions.
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
L

Legacy 98055

Guest
Hi
What does your formula have to do with the date and/or time the workbook is saved?
To send a date to a range, place this in the Workbook_BeforeSave procedure:
<pre>
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Sheets("YourSheetName").Range("A1").Value = Now 'date and time
'or
Sheets("YourSheetName").Range("A1").Value = Date 'just the date
End Sub

</pre>
Tom
 

Chartman of the Bored

Board Regular
Joined
Apr 24, 2002
Messages
83
On 2002-09-28 22:30, TsTom wrote:
Hi
What does your formula have to do with the date and/or time the workbook is saved?

I'm creating a worksheet for others to use and I just want a record of what week (as of each Friday) they entered the data. I'm just trying to make it easier for everyone, so they don't have to enter the date, and since I know they'll forget to use Friday and probably put that day's date, even if it's a Monday, Tues., etc.

Thanks for the code help. I'll try it.
 

mnmhenry

Board Regular
Joined
Mar 28, 2002
Messages
167
I would tend to put a line into a macro that copies and then paste's as a value. I have used this in some of my quotations... Its crude, but works well
 

Forum statistics

Threads
1,144,510
Messages
5,724,777
Members
422,576
Latest member
kayth891

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top