Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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..

share|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
add comment

2 Answers

up vote 6 down vote accepted

Use the value property of the cell:

TheCell.Value = Date

Date = Today

share|improve this answer
add comment

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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