我正在尝试保存As并为文件名添加时间戳,但未添加时间戳
该文件确实存储了但是使用原始文件名,因此它会一直覆盖以前的文件
谢谢
Sub Save_Workbook_BackUp()
Dim sDateTime As String, sFileName As String, s As String
With ThisWorkbook
sDateTime = " (" & Format(Now, "yyyy-mm-dd hhmm") & ").xlsm"
sFileName = Replace(.Name, ".xlsm", sDateTime)
.SaveCopyAs .Path & "\zMiscellany\BackUps\" & sFileName
End With