Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default How to write todays date in an autoexec function

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 791
Default How to write todays date in an autoexec function

Range("L1").FormulaR1C1 = "=Today()"

--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"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

  #3   Report Post  
Posted to microsoft.public.excel.programming
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Exel increment date problem wrt todays date. [email protected] Excel Worksheet Functions 1 November 11th 07 06:58 PM
how can I return todays date (today() ) in an if function Sally Excel Worksheet Functions 6 May 8th 06 12:55 PM
Create a button that will date stamp todays date in a cell Tom Meacham Excel Discussion (Misc queries) 3 January 11th 06 01:08 AM
When I open my past invoice it keeps changing date to todays date Stop date changing to todays in Excel Excel Worksheet Functions 2 October 7th 05 04:54 PM
How do I filter a list using a greater than todays date function? LV Excel Worksheet Functions 2 April 29th 05 06:07 PM


All times are GMT +1. The time now is 05:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"