gpt4 book ai didi

excel - Application.Quit 命令未关闭整个 Excel 应用程序

转载 作者:行者123 更新时间:2023-12-02 06:36:30 24 4
gpt4 key购买 nike

我在按钮下有以下代码。单击时,它只会关闭当前的 Excel 工作表,但不会关闭整个 Excel 应用程序。

Application.DisplayAlerts = False
ThisWorkbook.Save
Application.DisplayAlerts = True
Application.Quit

注意:我没有打开任何其他工作表。

仍然出现以下窗口。

enter image description here

最佳答案

我遇到了这个问题,我通过放入 Workbook_BeforeClose() 解决了它:

ThisWorkbook.saved = true

关于excel - Application.Quit 命令未关闭整个 Excel 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18738677/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com