Current date

R

richzip

I apologize if this is posted twice, but the post I made earlier doesn't seem
to be showing.

I have a macro set up that copies parts of a large worksheet into smaller,
individual worksheets. In these individual worksheets, I would also like to
place the current date (the date on which these sheets are being generated).
I don't want the date to change when someone opens it on a later date, so I
don't think the =TODAY() formula would work--correct me if I'm wrong?
 
J

Jacob Skaria

Within the macro add one more line. The below would add the date to cell A1
of the active sheet

Range("A1") = Date
 
F

FSt1

hi
you are not wrong about Today(). it is volitile and keyed to the system
clock meaning that it would change to the current date each time the sheet
calculates.
so in your macro somewhere either before or after the copy/paste, enter a
line like this.
range("A1").value = Date 'change cell reference to suit your needs.

vb recognizes Date as the current date and is not volitile meaning it wont
change.

regards
FSt1
 

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

Top