vba excel 保存文件自动为日期问题
标签: vba, 日期, excel
Sub DateSave()
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:= _
ThisWorkbook.Path & "\" & Date & ".xls", _
FileFormat:=xlNormal, _
Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, _
CreateBackup:=False
Application.DisplayAlerts = True
End Sub
这个复制excel文件的语句,每次保存后会自动命名为当前日期
把BIOS时间调到那时,创个文件,再把东东复制到里面就行啦,我也试过,还可以。
Sub DateSave()
Application.DisplayAlerts = False
ActiveWorkbook.SaveAs Filename:= _
ThisWorkbook.Path & "\" & Date & ".xls", _
FileFormat:=xlNormal, _
Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, _
CreateBackup:=False
Application.DisplayAlerts = True
不改变原始表格数据,打印时自动添加打印日期。
将此文件另存在为即可!