I want to close a Excel 2010 file with VBA.. but when the code runs, it shows a prompt confirmation.... i dont want to see this prompt..
didnt work:
Application.DisplayAlerts = False
ActiveWorkbook.Close SaveChanges:=False
is there a way to do this?
This question is related to
excel
excel-2010
vba
If you're not wanting to save changes set savechanges to false
Sub CloseBook2()
ActiveWorkbook.Close savechanges:=False
End Sub
for more examples, http://support.microsoft.com/kb/213428 and i believe in the past I've just used
ActiveWorkbook.Close False
Source: Stackoverflow.com