Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Johnathon Aaron Steel
 
Posts: n/a
Default Inserting Automatic Date

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
  #2   Report Post  
Paul B
 
Posts: n/a
Default

Johnathon, put this in the cell

=TODAY()
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"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



  #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



  #4   Report Post  
Bob Phillips
 
Posts: n/a
Default

Private Sub Workbook_Open()
Worksheets("Sheet1").Range("A1").Value = Format(Date, "dd mmm yyyy")
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code



--
HTH

Bob Phillips

"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



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
Turn off automatic date formatting? Nick Turner Excel Discussion (Misc queries) 3 July 13th 06 08:13 AM
Automatic date Mark Renfrow Excel Discussion (Misc queries) 4 July 5th 05 10:38 PM
Automatic Date Update khaji00 Excel Discussion (Misc queries) 2 June 22nd 05 11:48 PM
Automatic Populate Todays Date in Cell when File is Saved. Nello Excel Discussion (Misc queries) 3 April 21st 05 11:08 PM
Excel 2003 Inserting current date mark Excel Discussion (Misc queries) 3 February 9th 05 05:51 PM


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