使用公式:用=now()
然后选中此单元格,依次点选:工具---选项--重新计算 把【手动重算】和【保存前自动重算】 勾上
OK!
2019版本以上的,直接在excel选项中--公式---重新计算 把【手动重算】和【保存前自动重算】 勾上
这个是针对当前文件的设置,不会因电脑设置不同而无效的
以下有一个vbs批处理 当前目录及子目录下,所有excel文件,都改成手动重算,跳过临时文件,和出错自动 跳过
Option Explicit
Dim fso, objExcel
Set fso = CreateObject("Scripting.FileSystemObject")
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = False
objExcel.DisplayAlerts = False
Dim folder
Set folder = fso.GetFolder(CreateObject("WScript.Shell").CurrentDirectory)
ProcessFolder folder
objExcel.Quit
Sub ProcessFolder(f)
Dim file, subF, wb
For Each file In f.Files
' 排除临时文件(以 ~ 开头)并且只处理 xls/xlsx
If Left(file.Name, 1) <> "~" Then
If LCase(fso.GetExtensionName(file.Name)) = "xlsx" Or LCase(fso.GetExtensionName(file.Name)) = "xls" Then
On Error Resume Next
Set wb = objExcel.Workbooks.Open(file.Path)
If Err.Number = 0 Then
wb.Application.Calculation = -4135 ' xlCalculationManual
wb.Save
wb.Close
Else
' 出错时清除错误
Err.Clear
End If
On Error GoTo 0
End If
End If
Next
For Each subF In f.SubFolders
ProcessFolder subF
Next
End Sub