Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Capture file date of external file

Status
Not open for further replies.
Sep 29, 2009
13
US
Hey guys, I hope someone can help.

I've written a macro that pulls in data from a CSV file in Excel and formats it. Is there a way to capture the file date/time of the csv file? I want to be able to use it to display the age of the data.

Randy Davis
Denver, CO
 



Hi,

Check out the File Object of the FileSystemObject object. The File Object has a DateCreated property.

Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
No need of external object:
MyStamp = FileDateTime("\path\to\yourfile.csv")

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top