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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get LastUpdate info of files

Status
Not open for further replies.

AccessVB

MIS
Jun 23, 2002
82
US
Hi Everyone,
Trying to find a function that would grab the last edit date of files (spreadsheets, word docs etc) and pass it on to a variable. I would appreciate it if someone could point me in the right direction.



 
AccessVB,

I don't know much about it, but i'm sure the FileSystemObject can do this..

You reference the Microsoft Scripting Runtime Library in your project.

Do a keyword search for FileSystemObject

I hope this works for you.
 
Can use the FileSystemObject (FSO). Set a reference to the Microsoft Scripting Runtime.

Dim objFSO As New FileSystemObject
Dim objFile As File

Set objFile = objFSO.GetFile("x:\path\myfile.xls")
Debug.Print objFSO.DateLastModified

Set objFile = Nothing
Set objFSO = Nothing

Paul Bent
Northwind IT Systems
 
Thanks you two. I will try it. Greatly appreciate your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top