Date of file

  • Hi Jan-Henk

    The following code opens a dialog that lets the user select a file and then displays a message box when the file was last modified.

    Sub DisplayLastModifiedDateForFile()
        Dim fileToOpen
        fileToOpen = Application.GetOpenFilename("Text Files (*.txt), *.txt")
        If fileToOpen <> False Then MsgBox FileDateTime(fileToOpen)
    End Sub


Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!