I have the following vba code that returns the "date modified" field from a file, specified in filepath:
On one machine it runs without any problems, but on another I encounter the following error message:
Does anyone know how to fix this?
Thanks,
Code:
Function GetFileModifiedDate(filepath As String) As Date
Dim fs, f
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile(filepath)
GetFileModifiedDate = f.datelastmodified
End Function
Code:
Run-time error (8007007e) Automation error The specified module could not be found.
Thanks,
Comment