Excel – Fix a (Today) Date in Excel

microsoft excelvba

I have a file with a VB macro that puts a TODAY() formula in a cell when I click a button. The formula is volatile and updates every time the sheet is calculated. Instead, I would like to lock the value so that it only shows the date on which the macro was executed. So, if I open the file tomorrow, it will be the same value. How can I do this?

Best Answer

Use the value property of the cell:

TheCell.Value = Date 

Date = Today