我的工作簿包含几张纸,我想每天保存此文件,但是仅作为值,我尝试使用此代码,但是新生成的文件要求我输入密码“原始文件的密码”,应该怎么做?我确实要修改这个..
Sub SaveAsValues()
Dim ws As Worksheet
For Each ws In Worksheets
ws.UsedRange = ws.UsedRange.Value
Next ws
ThisWorkbook.SaveAs "Z:\Collateral Monitoring\Daily\LMM - " & Format(Date, "dd mmmm yyyy")
End Sub
答案 0 :(得分:0)
尝试一下...
ThisWorkbook.SaveAs "Z:\Collateral Monitoring\Daily\LMM - " & Format(Date, "dd mmmm yyyy") _
FileFormat:=xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, CreateBackup:=False