Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Automatically enter today's date as a static entry
I have a need to automatically save the current date to a cell in an excel spreadsheet every time the sheet is saved.
Today() always returns the current date, so once I open the sheet on a new day I can no longer see the date the information was last updated, i.e. saved. Any help would be appreciated. |
#2
|
|||
|
|||
Hi David,
Easy to fix. Simply go to View--Header/Footer--click either Custom Header or Custom Footer. From there you'll see several icons you can select. Two of them are for inserting date and time. Select what you need and viola! Problem solved. David wrote: I have a need to automatically save the current date to a cell in an excel spreadsheet every time the sheet is saved. Today() always returns the current date, so once I open the sheet on a new day I can no longer see the date the information was last updated, i.e. saved. Any help would be appreciated. |
#3
|
|||
|
|||
You need a Workbook_BeforeSave event procedure.
Alt+F11 to the VB Editor Double-click on the ThisWorkbook object in the Project Explorer Select Workbook from the left-hand dropdown and BeforeSave from the right-hand dropdown at the top of the main window. Insert the following between the lines that appear (Private Sub Workbook_BeforeSave... and End Sub): ThisWorkbook.Sheets("Sheet1").Range("A1") = Date adjust the sheet name and cell address appropriately. Bill Manville MVP - Microsoft Excel, Oxford, England No email replies please - respond to newsgroup |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel: How do I enter a date in one cell & automatically dates adj | Excel Discussion (Misc queries) | |||
how do i make a date change automatically if i change one before . | Excel Discussion (Misc queries) | |||
Negative numbers turn positive automatically on data entry | Excel Discussion (Misc queries) | |||
Today's Date | Excel Discussion (Misc queries) | |||
prevent 4/5 in a cell automatically transfer to a date format | Excel Discussion (Misc queries) |