如何避免在Excel-VBA中保存MessageBox提示? [英] How to avert the save MessageBox prompt in Excel-VBA?
本文介绍了如何避免在Excel-VBA中保存MessageBox提示?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如果在调用我最初复制的文件 .close
行之后,如果您看下面的代码,我有一个问题。它将提示保存MessageBox消息是yes,no或cancel。有没有反正我可以避免这个保存消息出现程序化如果不是的情况下,我可以只是编程程序它否
而不是
I have a problem here if you look at my codes below after I call the .close
line which was the file I initially copied from. It will prompt a save MessageBox message either yes, no, or cancel. Is there anyway I can avoid this save message from appearing programmatic if no was the case could I just programmatic program it no
instead?
推荐答案
Jon是正确的建议Application.DisplayAlerts
,如果你想回答否保存,因为你建议
Jon is right to suggest Application.DisplayAlerts and if you want to answer no to a save as you suggest
Workbooks(Filename1).Close SaveChanges:=False
这篇关于如何避免在Excel-VBA中保存MessageBox提示?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文