modified date is a property of the file accessed by:
usage:
vDate = getFileDate("c:\folder\file.txt")
Code:
Public Function getFileDate(ByVal pvFile)
getFileDate = getFileProperty2(pvFile, 5)
End Function
Public Function getFileProperty2(ByVal pvFile, ByVal pvProp)
'Dim XL As Excel.Application
'PROPERTIES VALUES
' 9 Author
'10 Title Author
'11 Subject Title
Dim vDir, f As String
Dim vDat
Dim sFolder As String
Dim oShell, oFold, objFolder, oItm
Dim fso
getDirName pvFile, vDir, f
sFolder = vDir
Set oShell = CreateObject("Shell.Application")
Set fso = CreateObject("scripting.FileSystemObject")
Set oFold = fso.GetFolder(sFolder)
Set objFolder = oShell.Namespace(oFold.Path)
Set oItm = objFolder.Parsename(f)
vDat = objFolder.GetDetailsOf(oItm, pvProp)
getFileProperty2= vDat
Set oShell = Nothing
Set fso = Nothing
Set oFold = Nothing
Set objFolder = Nothing
End Function