Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Date Function
I was wondering if we could set DATE & TIME on a worksheet (in a cell), which
would default to the present time. Once the work is complete and the worksheet is saved, the DATE & TIME should be saved as well. On review at a later time, the DATE & TIME should reflect the date and time the worksheet was saved, and not the present time. Any help would be greatly appreciated. THX. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Date Function
One way
Option Explicit Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Worksheets("Sheet1").Range("A1").Value = _ Format(Now, "dd mmm yyyy hh:mm:ss") 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 (remove nothere from email address if mailing direct) "Khangura" wrote in message ... I was wondering if we could set DATE & TIME on a worksheet (in a cell), which would default to the present time. Once the work is complete and the worksheet is saved, the DATE & TIME should be saved as well. On review at a later time, the DATE & TIME should reflect the date and time the worksheet was saved, and not the present time. Any help would be greatly appreciated. THX. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
date format and the RIGHT function | Excel Worksheet Functions | |||
NETWORKDAYS - Multiple Date Selection | Excel Discussion (Misc queries) | |||
Date function | Excel Worksheet Functions | |||
Excel date function | Excel Worksheet Functions | |||
Is there a function to show future date | Excel Worksheet Functions |