Showing date last saved

I want one of the cells on my worksheet to show the date the file was last 
saved on - and to update automatically.
What's the best way to do this?



5/9/2005 3:52:05 PM
excel.misc 78881 articles. 5 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 32

You need code to do this,

One way to do it, copy this code into the this 'ThisWorkbook' window in the 
VBA editor.

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As 
Sheet1.Range("A1").Value = Date
Sheet1.Range("A2").Value = Time
End Sub

This will put the date saved into A1 and the time saved into A2. To have the 
date and time in one cell use

Sheet1.Range("A1").Value = Now

To do this, hit Alt and F11 together to display the VB editor, on the left 
of the new window you should see 'This Workbook' Click this to open the 
window, copy and paste, hit Alt and F11 again to close the VB editor, save 
the file.
Adjust the cell references to suit and format the cells to suit as well,
"Colin Macleod" <> wrote in message 
>I want one of the cells on my worksheet to show the date the file was last 
>saved on - and to update automatically.
> What's the best way to do this?
> Thanks
> Colin
> -- 

alan111 (581)
5/9/2005 4:28:53 PM

Copy/paste this Function to a module in your workbook.

Function DocProps(prop As String)
    On Error GoTo err_value
    DocProps = ActiveWorkbook.BuiltinDocumentProperties _
    Exit Function
    DocProps = CVErr(xlErrValue)
End Function

Usage in a cell is:   =DOCPROPS("last save time")

Format the cell as Date.

You can also use "last author" or "creation date"

If not familiar with macros and VBA, visit David McRitchie's website on
"getting started".

In the meantime..........

To create a General Module, hit ALT + F11 to open the Visual Basic Editor.

Hit CRTL + R to open Project Explorer.

Find your workbook/project and select it.

Right-click and Insert>Module.  Paste the above code in there.  Save the
workbook and hit ALT + Q to return to your workbook.

Gord Dibben Excel MVP

On Mon, 09 May 2005 15:52:05 GMT, "Colin Macleod"
<> wrote:

>I want one of the cells on my worksheet to show the date the file was last 
>saved on - and to update automatically.
>What's the best way to do this?

5/9/2005 6:53:46 PM

Similar Artilces:

How Do I Save an Excel Sheet on Internet Explorer?
There is an excel sheet on my webpage, and I want it so the user ca save once they are done using the form, however... When the user tries to save, a box pops up saying "This sheet i readonly." How can I overcome this -- Message posted from Hi Your Internet provider must have Frontpage Server extensions running on the server if you want that. -- Regards Ron de Bruin (Win XP Pro SP-1 XL2000-2003) "kenji4861 >" <<> wrote in message news:kenji4861.1264u3@excelforum-nospa...

Saving a new quote before adding new quote products?
Hi all When creating a new quote, it has to be saved before new quote products (existing or write-in) can be added. Is there no other way to complete the quote form and save it all together at the end? The existing "save-step" is not really end user friendly. Anyone knows something more about this issue? Have fun :-) iStephan Quote products have a foreign key pointing to the quote, so it's not possible to save them before the quote itself is saved. As CRM is a web application, it's also not possible to create the quote and all quote details in one call - at least it ...

No dates
when ever i recieved an e-mail the date it was sent was always along side the e-mail, but know i dont get a date, why has this happenend, i like the date being printed as i know when i recieved them please help. Is there something i can do. "ANNA B." <> wrote in message news:%23htLYe01KHA.5828@TK2MSFTNGP02.phx.gbl... > when ever i recieved an e-mail the date it was sent was always along side > the e-mail, > but know i dont get a date, why has this happenend, i like the date being > printed as > i know when i recieved them...

Handling ATM transactions showing up in my checking account
How can I handle this - an ATM withdrawl shows that money has been removed, yet doesn't account for where it goes. Prior to Money Plus, I used an Excel spreadsheet to track expenses. In the spreadsheet format, I disregarded ATM transaction and opted to put my expenses into the spreadsheet. Now with Money Plus - it brings in my ATM withdrawls automatically. Any suggestions how do I override the ATM transactons so I can see the true expenses? Thanks, Jack In, Jack Ferrell <Jack> wrote: >How can I handle this - an...

How do I show summary totals from a pivot table on a bar chart
I created a pivot table which shows the both individual and grand totals based on the fields I selected. I then created a bar chart based on this pivot table. What I would like to do is show the grand totals as well as the individual totals. Is this possible, if so how do I do it? When I try this (link to the pivot table's summary total) I get an error saying not a valid function. The function line contains =GETPIVOTDATA("Personnel no.",'P2'!$A$3) "Jon Peltier" wrote: > Colleen - > > You can add textboxes to the chart, which are linked to works...

Solver not showing up even though it is loaded
Excel 2007: Please help me with this. I am getting a take home final tonight & will need Solver to complete it. There is also a project coming due & I need it for that, But I am in a serious fix regarding Solver . Your help will be so greatly appreciated I can't even tell you! When using solver I received an error message which seemed on but unfortunately I can't recall it. What does happen now is detailed below. Solver does not show up on the "Data" tab @ the extreme right: Under options it is shown as loaded: http://ti...

help with weekdays between two dates
A little rusty with access - been away for a while. Wondering if someone could help me with determining the weekdays between two dates. a simple function of somekind using the date or count functions? Be great if it did stat holidays too but I know that's asking more than is possible? JT "Jim" <> wrote in message news:2rWAj.66322$pM4.15431@pd7urf1no... >A little rusty with access - been away for a while. > > Wondering if someone could help me with determining the weekdays between > two dates. > > a simple function of somekind us...

How do I stop a general format from being autoformatted to date
I want to stop Excel from automatically changing the format of a cell from general to time every time I enter a new row of data. I have several column headings running across the top of the page and I have set the format of 4 columns to display the time (HH:MM), the next column has been formatted to show a GENERAL entry. This was done by selecting the whole column and applying the format of General. The problem is when I enter data for a particular row I enter from left to right and put the data in the 4 TIME formatted cells first, by the time I go to the 5th cell which should just be a n...

Excel 2002 crashing during "Save As" action.
I am having a problem when using "Save As" on a particular workbook I have developed. The workbook contains three separate sheets each containing a number of macros. Each time I "save as" I get the standard "Microsoft Excel has encountered a problem message". Interestingly I do not have a problem when I perform a standard "save" on the workbook, only when I try and change it's name using "save as". One way I have found to work around this is to select the "Manual" option for Calculations on the Tools/Options menu. Lead...

Date Help
I have linked two columns on a worksheet so that when I type in the date in cell C6 it also appears in cell J6. I entered =$C$6 in J6, and this works except sometimes I don’t need to use the date cells. My problem is in cell J6 the date appears as 1/0/00 until I type the date into cell C6. What am I doing wrong? Thanks, Malcolm Hi, use this formula instead =if(C6="","",$C$6) "Malcolm" wrote: > I have linked two columns on a worksheet so that when I type in the date in > cell C6 it also appears in cell J6. I entered =$C$6 in J6, and ...

Recover from ticking "Dont show me this again" message
I use more than one account and more than one ISP. Until a few days ago Outlook would warn me with a message to ask if it should change accounts or try to find the server from this account. That message was useful. Unfortunately one day I think I ticked the box that says "Dont show me this again", and now if I am using the wrong account it closes the connection. Anybody know how to get the message back - I know how to use the registry editor if that is necessary. Thank you Jeffrey Frankel Outlook version? In recent ones, it's in Tools > Options... > Mail Setup --...

Counting days between dates
I am trying to calculate working days late or early between two dates using =NETWORKDAYS(A2,B2) If I have a due date of 24 Sept and I ship on 24 Sep then I am neither late or early so I am on time i.e. 0 days - but my formula returns 1! If I have a due date of 24 Sept and I ship on 23 Sep then I am shipping 1 day early i.e. –1 – but my formula returns –2 formula due actual days early late should be 24-Sep 24-Sep 1 0 24-Sep 25-Sep 1 1 24-Sep 23-Sep -2 -1 What do I need to do...

I'm trying to save an excel file in .csv format with Excel 2003. After I get out of the file and get back in the format of the cells has changed. For instance, one column has all 4 digit numbers most of which have "0" as the first digit. The .csv file has omitted all of the zero's. It has also changed several of the cells to a date format. Does anyone have any ideas why this is happening? Thanks, Dwayne Dwayne, It's probably not the saving as csv that's changing your data, but the way Excel treats it when you reopen it with Excel. Try opening it with N...

Text Not Showing in Cell
I'm using excel to produce reports with almost all text. Some cells have a lot of words. Text Wrap is on. Row Height is set to AutoFit. Most cells show up just fine. Some have hidden words that run on under the next cell below. I have even encountered some cells that cut off right through the middle of the text. I can, of course, manually change the height of each row, but this report is over 200 lines long. Same problem happens when printed. Please help. Excel is not the greatest text editor. Have you considered doing the report in Word, using the Tables function? You co...

Old items showing on AP aging
We recently upgraded to V9 and it wasn't noticed right away so I don't know if this caused it, but it was not like this before the upgrade. When we print the AP agin old 2004 invoices are showing up as due when they are paid. The invoices were paid in 2004. We rebuilt the PM keys table and that didn't fix it. Any other idea what could cause this and how to fix it? Thanks Lisa, I had the same issue with one of my clients. These invoices came back after you did the checklinks. The apply information might be corrupted for these invoices that is why it put them back a...

Distribution Group email replies: Automatically get 'From' to show Group email address?
We have set up a distribution list in Exchange 2003 ( so that several support staff receive these incomign emails from clients. We want our replies to those emails to look as if they come from that support@ email address again. In very old posts, from 2002 to 2004, the same question gas already been posed and the answer has been for the person replying to ***manually*** click the "From" button so they can choose the distribution group email address. Well its 2007 now. Has this situation been changed so that when replying to distribution list emails the dis...

HOW DO I Auto inserting date and time?
Can someone out there please help me! Am trying to find what the formula would be to automatically insert date and time (in seperate columns) when another field has been filled. Ie, if cell C3 has data in it, then for C1 to automatically insert the date, and C2 to automatically insert a time. I am told that this IS possible, but I can't work out how to do it! Thank you in advance for any assistance! Shane --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system ( Version: 6.0.515 / Virus Database: 313 - Release Date: 01/09/2003 thank you...

newly downloaded transactions are not showing
Up until now Money 2006 has been working flawlessly. Today I go in to Money and download new transactions from my bank. Money shows that I have 42 new transactions to read; however when I go into the account to see the transactions they are not listed. I have checked my Views and all is as it should be. I cannot for the life of me figure out what is going on. Has anyone else ever experienced this phenomenon ? Money thinks it has 42 transactions (and it should) however they are not viewable. Any ideas, Duke In, Duke wrote: > Up until now Money 20...

showing repeating values in the rows of a pivot table
The default setting in pivot tables results in showing the repeating value of a row header in the first row only. Is it possible to allow the repeating value to populate all the cells to which it applies? Not while it's still a pivottable. I'll usually convert to values (or make a copy of that pivottable and convert that copy to values). Then I'll use techniques like those at Debra Dalgleish's site to fill those empty cells: kdschreck wrote: > > The default setting in pivot tables results in showing the repeating valu...

.net 2 and C#
I am using Visual Studio 2005 .NET 2.0. and C#. Has anybody transformed xml using xsl and shown the results as a web page? It should be a simple task.... but I can't find a way through the maze of deprecated or incompatible classes in .NET I have a dataset object (which has a GetXml() method which returns rows as a xml string) that I want to transform using an xsl file. Then I want the results in my web page. What is the best way to do this? When I copy examples I find, I can't build because various classes are deprecated. So I replace them with recommended alternatives and then ...

Feature Requests: Savings Goal & Bill Recurrence Fix
Just a couple of suggestions for the Money developers... 1) Creating a true savings goal feature. This would allow a user to earmark money within an account for a particular expense and continue to add/subtract to/from it. When viewing the account, you could then see what your current balance was with the savings goal money removed from the account or with the money in the account. The savings goal account would look like a separate account (although it really isn't) so you could view it in itself. This would also allow you to add to a savings goal from different accounts. In settin...

Date and time as long format in the taskbar
Operating system Windows 7 professional 64 bit the time is shown in the desktop of Windows in the taskbar down on the right. Is there the possibility in this place of showing the time and date into long format, example: Su, 29.08.2010 13:34:47? thanks Josef Josef, I don't think so, but if you "hover" your mouse cursor over the date shown, it will display "Sunday, August 29, 2010" (American format). The format displayed is controlled by the "Long Date" format chosen in "Control Panel/Regions and Languages". Will those choices sa...

help with date formula
hello gurus Imagine two columns (part of a larger table) , the first with dates, and the second showing the difference (in days) between a date and the one above it. My problem is that there are varying numbers blank rows between the dates. I'd like it to look like this... COLUMN A COLUMN B Aug 27, 08 0 Dec 01, 08 96 Jan 21, 09 51 Jan 22, 09 1 Mar 08, 09 55 What formula could I use in the cells of Column B? Much thanks Victoria On Sun, 29 Nov 2009 16:27:01 -0800, Victoria <Victoria@discussions.microsof...

Last entry in column
I've googled this forum, but can't find what I'm looking for. Probably just not using the right terms. I want to show in a cell what the last cell in a column with data in it is. I have a worksheet with a column in which I occasionally add another entry for a VLOOKUP. I want to automatically have the range for the VLOOKUP updated when I add another item to the VLOOKUP list. So is there a way, other than VBA code, to get the last cell address for my INDIRECT VLOOKUP to use? Thanks in advance! I believe a Dynamic Range Name is what you need. It automatically expands/contracts to a...

Build a date value
I have a stored proc that gets sent a month and year and I would like to turn it into a date using the day as 1. When I try it I get an error 'Explicit conversion from data type int to date is not allowed.' Below is my stored proc. Any help or alternative is appreciated. ALTER PROCEDURE [dbo].[mc_selPTODetailsForm] @Month smallint, @Year smallint, @AvailableOnly smallint AS BEGIN -- SET NOCOUNT ON added to prevent extra result sets from -- interfering with SELECT statements. SET NOCOUNT ON; DECLARE @dtYearAgo date; SET @dtYearAgo = @Month + '/1...