How to fix a Date value in excel cell? Explanation: I have a file with a VB macro who put a 'TODAY' value in a cell when i click a button. but! i would like to lock the value.. So if i open the file tomorrow it will be the same value.. Lol i hope it's clear enough.. Thanks to try to help me..

link|improve this question

1  
bAN is looking to prevent the Excel function =TODAY(), which is inserted into his sheet by a macro, from updating. Rather than =TODAY(), he's looking for a formula that will enter a date/time stamp and leave it. – Jared Harley Jul 30 '09 at 19:23
feedback

3 Answers

up vote 5 down vote accepted

Use the value property of the cell:

TheCell.Value = Date

Date = Today

link|improve this answer
feedback

If your macro fires on the click of a button and puts in TODAY...just don't hit the button again?

link|improve this answer
Because, i want my button works like a stamp.. – bAN Jul 30 '09 at 19:21
feedback

You'll have to go in and modify the VBA code in the Click event off the button. I'd create a second button if you want Today's date in the cell, and disable it from the first button.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.