一般来说,我遇到的问题是,每当我的代码结束时(请参阅下面):
您能建议我如何同时删除上述提示,同时保存/覆盖旧版本的文件吗?
Sub Test()
Application.ScreenUpdating = False
Application.DisplayAlerts = False
****rest of the code***
WB1.Save
WB2.Save
WB3.Save
Application.Quit
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
发布于 2017-12-04 04:30:53
谢谢@Peter_Pesch的建议,决议如下。我在VBA运行时打开了4个文件。
....
WB1.Save
WB1.Saved = True
WB2.Saved = True
WB3.Saved = True
ActiveWorkbook.Saved = True
Application.Quit
Application.DisplayAlerts = True
Application.ScreenUpdating = True
End Sub
https://stackoverflow.com/questions/47632972
复制