Quit without saving

  • Thread starter Thread starter Jim333
  • Start date Start date
J

Jim333

Hi everybody,

How can I quit excel without saving changes in the concerned workbook,
and even without displaying the alert message that asks for saving
changes or not.

I hope that my question is cleard for all,

Thanx,
 
ActiveWorkbook.Saved = True
That'll make Excel think it WAS saved, even though it wasn't. You need to
open the workbook, hit Alt+F11. Double-click ThisWorkbook under your
workbook's project, and hit the General dropdown and choose Workbook. On the
right, choose BeforeSave. Then paste the line above between the sub/endsub
lines. :)
*******************
~Anne Troy

www.OfficeArticles.com
www.MyExpertsOnline.com
 
Hi,

This code is good to save changes before quitting, while I don't want
to save changes made to the workbook,

I want to quit without saving changes and without displaying the
saveing alert.

Thank you
 
Try to put

ActiveWorkbook.Saved = True
Application.Displayalerts = False

into the workbook's BeforeClose rutin!

Regards,
Stefi

„Jim333†ezt írta:
 
Back
Top