|
-
Jun 29th, 2005, 09:28 PM
#1
Thread Starter
Fanatic Member
Last time File was opened
How do I find the time that a file was last opened?
Thanks,
Sir Loin
-
Jun 29th, 2005, 10:27 PM
#2
Re: Last time File was opened
The easy way is to use FSO (file system object model) but better way is to use Windows API.
Here is a quick FSO sample:
VB Code:
Private Sub Command1_Click()
'===============================
Dim fso As New FileSystemObject
Dim oFile As File
Set fldr = fso.GetFolder("c:\temp")
Debug.Print "Last accessed: " & oFile.DateLastAccessed
End Sub
-
Jun 30th, 2005, 02:05 AM
#3
Re: Last time File was opened
The last accessed date is not always the date it was last opened.
If you look at the properties in explorer, the last accessed date is changed as well.
Unless the file itselve registers when it was last opened, I don't think it can be done.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|