为了优化我的代码,我关闭了几个Application Object成员 属性; 一个特别是.CutCopyMode属性.
Sub MyProcedure()
With Application
.ScreenUpdating = False
.EnableEvents = False
.CutCopyMode = False
End With
' lots of code here
Run Code Online (Sandbox Code Playgroud)
在我的子查询完成之前,我应该再与其他人一起重新打开.CutCopyMode(例如True)吗?
' lots of code here
With Application
.ScreenUpdating = True
.EnableEvents = True
.CutCopyMode = True '<~~ ???
End With
End Sub
Run Code Online (Sandbox Code Playgroud)