View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
FSt1 FSt1 is offline
external usenet poster
 
Posts: 3,942
Default How to write todays date in an autoexec function

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

"Paul Lambson" wrote:

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