Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
David
 
Posts: n/a
Default 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   Report Post  
mrscott
 
Posts: n/a
Default

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   Report Post  
Bill Manville
 
Posts: n/a
Default

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
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
Excel: How do I enter a date in one cell & automatically dates adj Shannon Excel Discussion (Misc queries) 4 January 12th 05 12:51 AM
how do i make a date change automatically if i change one before . dpl7579 Excel Discussion (Misc queries) 1 January 11th 05 09:21 PM
Negative numbers turn positive automatically on data entry Jerri Excel Discussion (Misc queries) 4 January 8th 05 05:05 PM
Today's Date Jake Excel Discussion (Misc queries) 9 December 17th 04 09:57 PM
prevent 4/5 in a cell automatically transfer to a date format kei Excel Discussion (Misc queries) 3 December 9th 04 11:52 AM


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