ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Quit without saving (https://www.excelbanter.com/excel-programming/332494-quit-without-saving.html)

Jim333[_2_]

Quit without saving
 

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,


--
Jim333
------------------------------------------------------------------------
Jim333's Profile: http://www.excelforum.com/member.php...fo&userid=5186
View this thread: http://www.excelforum.com/showthread...hreadid=381121


Anne Troy[_2_]

Quit without saving
 
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


"Jim333" wrote in
message ...

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,


--
Jim333
------------------------------------------------------------------------
Jim333's Profile:

http://www.excelforum.com/member.php...fo&userid=5186
View this thread: http://www.excelforum.com/showthread...hreadid=381121




Jim333[_3_]

Quit without saving
 

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


--
Jim333
------------------------------------------------------------------------
Jim333's Profile: http://www.excelforum.com/member.php...fo&userid=5186
View this thread: http://www.excelforum.com/showthread...hreadid=381121


Stefi

Quit without saving
 
Try to put

ActiveWorkbook.Saved = True
Application.Displayalerts = False

into the workbook's BeforeClose rutin!

Regards,
Stefi

€˛Jim333€¯ ezt Ć*rta:


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


--
Jim333
------------------------------------------------------------------------
Jim333's Profile: http://www.excelforum.com/member.php...fo&userid=5186
View this thread: http://www.excelforum.com/showthread...hreadid=381121



Tom Ogilvy

Quit without saving
 
ActiveWorkbook.Close SaveChanges:=False

--
Regards,
Tom Ogilvy


"Jim333" wrote in
message ...

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


--
Jim333
------------------------------------------------------------------------
Jim333's Profile:

http://www.excelforum.com/member.php...fo&userid=5186
View this thread: http://www.excelforum.com/showthread...hreadid=381121





All times are GMT +1. The time now is 02:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com