I think you want to change the date. If so, see. This
Debug.Print FileDateTime("C:\Sample.txt")
The format of the displayed date and time is based on the language settings of your system.
Edit
Using FileSystemObject
Option Explicit Sub Sample() Dim oFS As Object Dim sFile As String sFile = "C:\MyFile.txt" Set oFS = CreateObject("Scripting.FileSystemObject") '~~> Created Date Debug.Print "Created Date : "; oFS.GetFile(sFile).DateCreated '~~> Modified Date Debug.Print "Modified Date : "; oFS.GetFile(sFile).Datelastmodified Set oFS = Nothing End Sub
source share