Archive of Mr Excel Message Board

Back to Excel VBA archive index
Back to archive home

"activewindow.close" How do I tell it not to save?
Posted by Jason on January 17, 2002 9:01 AM
I am using the activewindow.close command. When it closes the application, I get a pop-up asking if I want to save. How do I get it to just close and not ask if I want to save?

| Check out our Excel VBA Resources
|
 |
 |
 |
 |
 |
DisplayAlerts
Posted by Dan on January 17, 2002 9:06 AM
Application.DisplayAlerts = False
ActiveWindow.Close
Application.DisplayAlerts = True

Thanks, that works great.
Posted by Jason on January 17, 2002 9:12 AM
Another problem solved by the Message Board.
A better way.
E-mailed by Derek B on February 8, 2007
A better way to do this: ActiveWindow.Close SaveChanges:=false

This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2007 MrExcel.com.
Visit our
online store to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.