简体   繁体   English

Excel / VBA文件创建日期

[英]Excel/VBA File Creation Date

When creating a new file using VBA like so... 像这样使用VBA创建新文件时...

FileCopy "\\JACKSONVILLE-DC\Common\SOP's for JV\SOP Audits\SOP Audit Checklist-Template.xlsx", _
         "\\JACKSONVILLE-DC\Common\SOP's for JV\SOP Audits\2019\" & NewAuditFileName

Where is the system pulling the date/time to tell Windows when the file was created? 系统将日期/时间拉到哪里告诉Windows文件创建的时间? Currently, for a file created yesterday (7/31/19) it shows the Date Created in Windows as 3/19/2019 with a Date Modified as 7/31/2019. 当前,对于昨天(7/31/19)创建的文件,它显示在Windows中的创建日期为3/19/2019,而将日期修改为7/31/2019。

When you do this it is essentially the same as copying and pasting in Windows Explorer. 当您执行此操作时,它基本上与Windows资源管理器中的复制和粘贴相同。

Therefore the Created and Modified dates will be those of the source file. 因此,“创建和修改”日期将是源文件的日期。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM