Keep a date from updating

  • Thread starter Thread starter mellowe
  • Start date Start date
M

mellowe

Hi there. When I run my macro it populates cell A1 with todays date,
the problem is the next day the date changes to the current day. I
would like the date to stay at the date the macro is run then the next
day it keeps the date etc. so I can look back in the month and see the
correct date. Please help , am I missing soemthing simple here?
 
Convert the formula [I expect it is =TODAY() ] to a value within the macro
with
these three lines of code
Range("A1").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False

best wishes
 
Thanks, but how do I incorporate this into my formula which is:

Range("A1").Select
ActiveCell.FormulaR1C1 = "=TODAY()"
Range("A1").Select
Selection.NumberFormat = "[$-F800]dddd, mmmm dd, yyyy"
 
Range("A1") = Date
Range("A1").Numberformat =...................

You don't have to select, and VBA knows the date as well, so you don't need
TODAY()
 
Thankyou very much this seems to do the job, I will be testing for next
few days.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top