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!

last modified date

Status
Not open for further replies.

colriver

Programmer
Oct 24, 2000
6
US
Does any one know how to get a files last modified date?
 
Make reference to MIcrosoft Scripting RuntimeOption Explicit
Dim fso As FileSystemObject

Private Sub Command1_Click()
Dim ofile As Scripting.File
Dim sfile As String
sfile = "C:\programing\David\Database\Accounting.mdb" 'Put your file in here
Set fso = New FileSystemObject
Set ofile = fso.GetFile(sfile)
MsgBox ofile.DateCreated, , "Date Created"
MsgBox ofile.DateLastAccessed, , "Date Last Assessed"
MsgBox ofile.DateLastModified, , "Date Last Modified"
MsgBox ofile.Attributes
End Sub


David Paulson


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top