+ Reply to Thread
Results 1 to 7 of 7

VB Code to get the Modification date of excel file

  1. #1
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    VB Code to get the Modification date of excel file

    Hello:

    Please refer to attached file.
    I have xlsm file as shown in cell C3.
    I need a VB code to get the Date and time of the last modification made on this file and put that in cell D4

    Let me know if you have any questions.
    Thanks.

    Riz
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: VB Code to get the Modification date of excel file

    FileDateTime is what you need, add the following UDF and then refer to it in D4

    Please Login or Register  to view this content.
    ie = Modified(C3)
    Last edited by pjwhitfield; 01-11-2016 at 10:10 AM.
    If someone has helped you then please add to their Reputation

  3. #3
    Forum Contributor
    Join Date
    09-03-2015
    Location
    IE
    MS-Off Ver
    2003 - 2016
    Posts
    258

    Re: VB Code to get the Modification date of excel file

    Ignore - didn't notice the file name was in a cell...

    If you mean the File Date/Time last saved, then
    Please Login or Register  to view this content.
    Add to a modula and use as a UDF

  4. #4
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB Code to get the Modification date of excel file

    Hello:

    Please refer to attached file.
    Can you please check and see what i am doing here.
    I am getting error.
    Let me know if you have any questions.
    Thanks.
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VB Code to get the Modification date of excel file

    Maybe:

    Please Login or Register  to view this content.

  6. #6
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: VB Code to get the Modification date of excel file

    Quote Originally Posted by rizmomin View Post
    Hello:

    Please refer to attached file.
    Can you please check and see what i am doing here.
    I am getting error.
    Let me know if you have any questions.
    Thanks.
    You need to put your UDF in a Module not in the Sheets VBA, insert a module and paste it in there.

  7. #7
    Valued Forum Contributor
    Join Date
    01-18-2007
    Location
    Georgia
    MS-Off Ver
    2010
    Posts
    4,434

    Re: VB Code to get the Modification date of excel file

    Hello Pj:

    Thanks a lot,...it works

    Riz

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. check modification date of online file
    By bagullo in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-29-2015, 02:47 AM
  2. [SOLVED] vba code to open excel file name in previous weekday date
    By prabhuduraraj09 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-23-2014, 05:09 PM
  3. Q-2 Macro code for date and time in protected excel file when if condition applicable
    By ajeshvnair in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-07-2013, 05:35 AM
  4. [SOLVED] Slight Modification Request VBA Code - Text File to Excel
    By spiwere in forum Excel Programming / VBA / Macros
    Replies: 23
    Last Post: 03-22-2013, 04:39 AM
  5. Macro to check for file modification and display a pop-up or reload the client file.
    By Askander in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-02-2011, 09:26 AM
  6. modification date for a file
    By neta in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-05-2009, 12:31 PM
  7. [SOLVED] Excel file modification date
    By GROSNER in forum Excel General
    Replies: 5
    Last Post: 03-03-2005, 10:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1