本文为《别怕,Excel VBA其实特别简单(第3版)》随书问题参考答案
要解决本列的问题,可以在过程中设置Application对象的ScreenUpdating 属性为alse,将过程改写为:
Sub 将工作表另存为工作簿()
Application.ScreenUpdating = False
Dim Sht As Worksheet
For Each Sht In Worksheets
Sht.Copy
ActiveWorkbook.SaveAs Filename:=ThisWorkbook.Path & "\" & Sht.Name & ".xlsx"
ActiveWorkbook.Close
Next Sht
Application.ScreenUpdating = True
End Sub