Power Query Course in Spanish
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: formula / macro required

  1. #1
    New Member
    Join Date
    Mar 2002
    Posts
    2
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    How can i show the last time i modified a *.xls file in a cell in the worksheet

  2. #2
    MrExcel MVP Ivan F Moala's Avatar
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    4,209
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Try this UDF...place code in a Std Module;

    Function File_LastModified(FullFilePath)
    Dim FSO, F
    'Usage:= Placed in a cell [=File_LastModified(C:ExcelFilesUseful###.xls)]
    'Usage:= Placed in a cell [=File_LastModified(A1)]

    Set FSO = CreateObject("Scripting.FileSystemObject")
    Set F = FSO.GetFile(FullFilePath)

    File_LastModified = "Last Modified: " & F.DateLastModified

    End Function



    HTH

    Ivan

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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