VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Simple VB code to know the date and time when a file was created or last modified.

by leesoj (1 Submission)
Category: Files/File Controls/Input/Output
Compatability: Visual Basic 3.0
Difficulty: Unknown Difficulty
Originally Published: Fri 20th July 2007
Date Added: Mon 8th February 2021
Rating: (1 Votes)

Simple VB code to know the date and time when a file was created or last modified.

API Declarations


'Simple VB code to know the date and time when a file was created
'or last modified.



Rate Simple VB code to know the date and time when a file was created or last modified.



'or last modified.



Sub FileCreatedDateTime()

Dim filename As String

On Error GoTo errHandler

filename = InputBox("Please enter file name ?", "Input")
If Trim(filename) <> "" Then
MsgBox FileDateTime(filename)
Else
MsgBox "Invalid filename !!!", vbCritical + vbOKOnly, "Error!!!"
End If

errHandler:

If Err.Number <> 0 Then
MsgBox "Error Description :" & Err.Description & vbCrLf & " Error No : " & Err.Number, vbCritical + vbOKOnly, "Error!!!"
End If

End Sub


Download this snippet    Add to My Saved Code

Simple VB code to know the date and time when a file was created or last modified. Comments

No comments have been posted about Simple VB code to know the date and time when a file was created or last modified.. Why not be the first to post a comment about Simple VB code to know the date and time when a file was created or last modified..

Post your comment

Subject:
Message:
0/1000 characters