how to enter the date automatically?

J

Jahcureus

How to enter the date automatically. Once I open the file i want it to have
the have the current date. I know it involves using the date command but not
sure how.

Thanks for the help
 
B

Bob Phillips

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

RP
(remove nothere from the email address if mailing direct)
 
I

IrishAnne

Type in =Now in appropriate cell. It will display date and time. To change
format just show date - Format,Cells and click Number tab and select format
you want.

Hope that helps.
 
Top