Tom’s Tutorials For Excel: Knowing Any Workbook’s Last Saved Date and Time

You can get the last saved date and time for any workbook whether it is open or closed. In Step 3, for demonstration purposes in the Immediate window, I preceded that line of code with the then-current date and time. In the following pictures, Book1 is the only workbook open in the Visual Basic Editor’s Project window. In the Immediate window of the VBE, I typed the following line of code and pressed Enter to know the last saved date and time for a closed workbook named YourFileName.xlsm located in the path
"C:\Your\File\Path\YourFileName.xlsm"
TTFE026a
TTFE026b
TTFE026c
TTFE026d

Share Button
Posted in Tom's Tutorials for Excel
Tags: ,
9 comments on “Tom’s Tutorials For Excel: Knowing Any Workbook’s Last Saved Date and Time
  1. Numan says:

    Hi Tom,
    Nice tip. but is it possible to know who saved (application.username) the file, any vba command.

    Thanks

    • Tom Urtis says:

      Because the last saved date could be derived while the workbook is closed, you’d need a way to look at the past to know who was in the file (as opposed to looking at the present to know who is in the file). If it were me, I’d have a veryhidden sheet in the file(s) of interest that maintains an ongoing (or could be just the latest) record of usernames. That link (it would look like a paste link formula) could be entered in the immediate window of another workbook to return the person who last saved the file.

  2. Harshavardhan Kulkarni says:

    Sir,
    I need Vlookup Macro code.

    Conditions:-

    I have one Master Excel spreadsheet with only one Tab.

    And I have divided into 10 Separate Excel files spreadsheet each with respect to individual name. All the 10 separate Excel files has only one Tab each only.

    For example in Master Excel spreadsheet Column A has unique values around 500.
    Column B to column G Data is same in both Master Spreadsheet and 10 separate Excel files spreadsheet.

    Column H we consider for Name.

    But from Column H to Z I need to take Data from 10 Separate Each Excel Files spreadsheet Data into Master Excel spreadsheet with the help of Vlookup.

    Manual If error Vlookup I have used but MS Excel Master Spreadsheet will hang due to huge Vlookup formula.

    But I need Vlookup Macro code to run on a daily basis.

    Rough Data you may create on your own basis to write Vlookup macro code.

    Kindly help me out by providing Macro code and I tried from Google website but unable to match criteria.

    Many thanks in advance for your help.

    Harsha.
    +919964149582.

    • Tom Urtis says:

      Hello Harshavardhan —

      Your request is absolutely do-able and very straightforward with your description. Thank you.

      As I write this, I am completing a client project with a hard deadline, so I cannot get to your request for a few days. Because you dis such a great job explaining your need, I strongly suggest you post it the same way on an excellent Excel forum that I also contribute to when I get the chance. It is at https://www.mrexcel.com/board/forums/excel-questions.10/ which is free and easy to register. There are always experts who are on line to help you faster than I can this week.

      After that, if you are still stuck, please post back here around the end of next week when I should be able to help.

      • Harsha says:

        Sir,

        I have posted the same in Mr. Excel and if you get free time by chance kindly send me the code this an request help as your have knowledge and your are my Excel guru.

        Many thanks in advance.

        • Tom Urtis says:

          If you do not get an answer on MrExcel between now and Friday of next week (May 1), please post back here and I will be able to help you after I complete my client deadline projects.

  3. Harsha says:

    Sir,
    My self Harsha some days back I have asked about Vlookup VBA code from other different workbook files but still I am searching.
    Kindly help me out no

  4. Harsha says:

    Hello Sir,

    I need Vlookup Macro code.

    Conditions:-

    I have one Master Excel spreadsheet with only one Tab.

    And I have divided into 10 Separate Excel files spreadsheet each with respect to individual name. All the 10 separate Excel files has only one Tab each only.

    For example in Master Excel spreadsheet Column A has unique values around 500.

    Column B to column G Data is same in both Master Spreadsheet and 10 separate Excel files spreadsheet.

    Column H we consider for Name.

    But from Column H to Z I need to take Data from 10 Separate Each Excel Files spreadsheet Data into Master Excel spreadsheet with the help of Vlookup.

    Manual If error Vlookup I have used but MS Excel Master Spreadsheet will hang due to huge Vlookup formula.

    But I need Vlookup Macro code to run on a daily basis.

    Rough Data you may create on your own basis to write Vlookup macro code.

    Kindly help me out by providing Macro code and I tried from Google website but unable to match criteria.

    Many thanks in advance for your help.

    • Tom Urtis says:

      Hello Harsha, than you for your comment and request.

      This week, I must meet a deadline to complete an Excel project for a client. May I suggest a popular and excellent Excel questions & answers forum that I also contribute to, which has Excel experts 24 hours a day who visit and answer questions for free. You will get faster service there. If you still do not have an answer by next week, let me know. But I bet they can answer your question much quicker than I can unfortunately get to it. The link is https://www.mrexcel.com/board/forums/excel-questions.10/ and it is free and easy to join.

Leave a Reply to Harshavardhan Kulkarni Cancel reply

Your email address will not be published. Required fields are marked *

*