FSO DateLastModified

S

Scott

I'm trying to get the DateLastModified property of a file, but get an error
saying "User-defined type not defined" on the "Dim fl ..." line in my code
below.

I have the Windows Script Host Object Model selected in my References to
enable the use of the FSO library. What causes this error?


CODE **************

Dim FSO As New FileSystemObject
Dim fl As Scripting.file
Set fl = FSO.getfile("c:\temp\myDataFile.mdb")
MsgBox fl.DateLastModified
 
B

Barry Gilbert

FileSystemObjects come from Microsoft Scripting Runtime, not Windows Script
Host.

Barry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top