Get the system file created date

N

Nancy T.

I have files that I need to access the date the file was created via VBA.
However, for some reason, the properties of the document show a created date
of yesterday but in actuallity the files have been created over the last
several month. Using the detail view in Windows Explorer, the Date Created is
correct. I have copied files back and forth from a portable drive, so I am
assuming Word is using that date. Is there a way to access the date that
Windows has using VBA?
 
K

Karl E. Peterson

Nancy T. said:
I have files that I need to access the date the file was created via VBA.
However, for some reason, the properties of the document show a created date
of yesterday but in actuallity the files have been created over the last
several month. Using the detail view in Windows Explorer, the Date Created is
correct. I have copied files back and forth from a portable drive, so I am
assuming Word is using that date. Is there a way to access the date that
Windows has using VBA?

I'm not sure if there's an easier way, but you can certainly get at all three
filedates using the FileFindFirst API. See http://vb.mvps.org/samples/FileInfo for
a class that'll drop right in, and provide you this and much, much more.
 

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