-
Copy my files + Date
Hi,
I need to copy a file, use the following procedure now
Code:
Sub Copia_File()
Origine = ThisWorkbook.Path & "\Goods\" & TextBox2.Text & ".db4"
Copia = ThisWorkbook.Path & "\Goods\" & TextBox3.Text & ".db4"
FileCopy Origine, Copia
End Sub
I have to simulate a change to the file.
I use the pc can not open the file in any way, I ask only to update the save date with one of the day.
What code can change the save date ..
Thanks in advance
-
Code:
Sub Copia_File()
Origine = ThisWorkbook.Path & "\Goods\" & TextBox2.Text & ".db4"
Copia = ThisWorkbook.Path & "\Goods\" & TextBox3.Text & Format(Date, "dd-mm-yy") & ".db4"
FileCopy Origine, Copia
End Sub
-
Hi
I have to simulate a change date to the file.
I just have to simulate the creation date of the file
What you propose does not update the date as requested
Could alternatively create a text file with the extension .db4
I do not have to use in this demo the files in any way
-
There is no file property called save date. There is a ModificationDate, CreatedDate, and LastAccessedDate. Changing those properties can cause unexpected problems.
See this link if you want to get or set file times. http://www.cpearson.com/excel/FileTimes.htm