View Single Post
  #3   Report Post  
David McRitchie
 
Posts: n/a
Default

Hi Johnathon,

Current Date:
If you are just using the file during day and not over midnight
you can use =TODAY() which will change after midnight and
a recalculation takes place.

Date First Opened
Do you want a constant set permanently when the workbook is
originally opened using an Event macro. If the sheet is deleted
a new one will be created next time workbook is opened.

In your Template, right click on the logo to left of the menu bar,
View code, insert the following code after your Option Explicit
which you should already have.

Sub WorkBook_Open()
On Error Resume Next
If Len(Worksheets("newdoc").Name) = 0 Then
On Error GoTo 0
Sheets.Add After:=Sheets(Sheets.Count) '-- place at end
ActiveSheet.Name = "newdoc"
Range("A1") = Now() '-- or for just date use DATE
Columns("A:A").EntireColumn.AutoFit
Sheets(1).Activate
Else
On Error GoTo 0
End If
End Sub

---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Johnathon Aaron Steel" wrote in message ...
I have a Template and when I open it up I want it to be able to insert
the date in a specific cell on open and not have to type it in.

Is this possible?

Thanx

JAS