How to write todays date in an autoexec function

P

Paul Lambson

I run an auto exec macro that updates a report and I want to add the
day the report was updated in a cell in the report. So I just need to
tack on a few lines of code that write todays date in a cell on the
bookings tab, in cell L1. If this only writes when the autoexec macro
runs it shouldn't replace the date if the macro hasn't run... is this
assumption correct?

Thanks for the help,
Paul
 
F

FSt1

hi
sheets("Bookings").range("L1")= Date

if Bookings is the active sheet while the macro is running then you might
get away with
Range("L1") = Date

this code willl produce a static date of the date the macro was run and will
remain unchanged untill the macro is run again or the date changed manually.

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