Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default Date but not TODAY() ...

Hi all,

I need a little macro for a worksheet template that
enters the date into a cell the first time the worksheet
is created/opened from the template but then preserves
the original date thereafter ... in other words I cannot
use the TODAY() function as it changes the date as the
date progresses.

Thanks in advance ...

Michelle
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Date but not TODAY() ...

Michelle,

Checking to see if the first cell has a date value, if not then set it to
today

Private Sub Workbook_Open()
If Not IsDate(Sheet1.Cells(1).Value) Then Sheet1.Cells(1).Value = Date
End Sub

Rob


"Michelle" wrote in message
...
Hi all,

I need a little macro for a worksheet template that
enters the date into a cell the first time the worksheet
is created/opened from the template but then preserves
the original date thereafter ... in other words I cannot
use the TODAY() function as it changes the date as the
date progresses.

Thanks in advance ...

Michelle



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
change date in excel from today to original date of file Nelson Excel Discussion (Misc queries) 1 September 18th 09 08:33 AM
Date Formula for number of days between a date and today BrendaP Excel Discussion (Misc queries) 7 July 2nd 09 07:30 PM
IF TODAY equals date in cell A10, or if TODAY is beyond that date SoupNazi Excel Worksheet Functions 4 April 23rd 07 01:14 AM
MAX figure within a date range as a function of today()'s date irvine79 Excel Worksheet Functions 6 February 20th 07 03:28 PM
SUMIF within date range as a function of today()'s date irvine79 Excel Worksheet Functions 8 August 6th 06 05:55 PM


All times are GMT +1. The time now is 09: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"