<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: VBA: Exit Without Saving</title>
	<atom:link href="http://www.automateexcel.com/2004/10/22/excel_vba_exit_without_saving/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.automateexcel.com/2004/10/22/excel_vba_exit_without_saving/</link>
	<description>Everything Excel. Only Excel.</description>
	<lastBuildDate>Mon, 21 Nov 2011 07:25:47 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Nate</title>
		<link>http://www.automateexcel.com/2004/10/22/excel_vba_exit_without_saving/comment-page-1/#comment-2144</link>
		<dc:creator>Nate</dc:creator>
		<pubDate>Fri, 15 Jul 2011 18:34:08 +0000</pubDate>
		<guid isPermaLink="false">#comment-2144</guid>
		<description>Is there any way to restart Excel within a VBA macro? I&#039;d like to set up an error handler with a user form that allows the user to reboot Excel or continue.</description>
		<content:encoded><![CDATA[<p>Is there any way to restart Excel within a VBA macro? I&#8217;d like to set up an error handler with a user form that allows the user to reboot Excel or continue.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dennis</title>
		<link>http://www.automateexcel.com/2004/10/22/excel_vba_exit_without_saving/comment-page-1/#comment-2142</link>
		<dc:creator>Dennis</dc:creator>
		<pubDate>Fri, 15 Jul 2011 09:29:42 +0000</pubDate>
		<guid isPermaLink="false">#comment-2142</guid>
		<description>Perfekt, just what I needed</description>
		<content:encoded><![CDATA[<p>Perfekt, just what I needed</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ken</title>
		<link>http://www.automateexcel.com/2004/10/22/excel_vba_exit_without_saving/comment-page-1/#comment-2036</link>
		<dc:creator>Ken</dc:creator>
		<pubDate>Sun, 27 Mar 2011 01:19:27 +0000</pubDate>
		<guid isPermaLink="false">#comment-2036</guid>
		<description>You can also use this if you only wish to close the workbook containing the code.

Private Sub Workbook_BeforeClose(Cancel As Boolean)
    Application.DisplayAlerts = False
    Workbooks(&quot;receipt tax spreader tool.XLS&quot;).Close
    Application.DisplayAlerts = True
End Sub

I used it for a calculator-type file to help me with my finances.</description>
		<content:encoded><![CDATA[<p>You can also use this if you only wish to close the workbook containing the code.</p>
<p>Private Sub Workbook_BeforeClose(Cancel As Boolean)<br />
    Application.DisplayAlerts = False<br />
    Workbooks(&#8220;receipt tax spreader tool.XLS&#8221;).Close<br />
    Application.DisplayAlerts = True<br />
End Sub</p>
<p>I used it for a calculator-type file to help me with my finances.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mark</title>
		<link>http://www.automateexcel.com/2004/10/22/excel_vba_exit_without_saving/comment-page-1/#comment-1952</link>
		<dc:creator>mark</dc:creator>
		<pubDate>Mon, 24 Jan 2011 21:58:14 +0000</pubDate>
		<guid isPermaLink="false">#comment-1952</guid>
		<description>i just included this code in an auto open sub to create different views for different business users. (ie it will run different commands if the username is in different lists on a worksheet. (stupidly) i ran the sub with my username on the autoexit list, as part of testing. now whenever i open the file it automatically exits.

as this is a test file i cannot send it to other users as i am the only name on the list. can anyone think of a workaround for this? i need to be able to get into the macro but without it running

thanks in advance</description>
		<content:encoded><![CDATA[<p>i just included this code in an auto open sub to create different views for different business users. (ie it will run different commands if the username is in different lists on a worksheet. (stupidly) i ran the sub with my username on the autoexit list, as part of testing. now whenever i open the file it automatically exits.</p>
<p>as this is a test file i cannot send it to other users as i am the only name on the list. can anyone think of a workaround for this? i need to be able to get into the macro but without it running</p>
<p>thanks in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A Different Scott</title>
		<link>http://www.automateexcel.com/2004/10/22/excel_vba_exit_without_saving/comment-page-1/#comment-1859</link>
		<dc:creator>A Different Scott</dc:creator>
		<pubDate>Mon, 06 Dec 2010 16:13:59 +0000</pubDate>
		<guid isPermaLink="false">#comment-1859</guid>
		<description>An application I just had for this:

I had an Access VBA function open up an instance of excel, make some changes to a file in the background, and bring up a &quot;Save As&quot; dialog. If the user clicks &quot;Cancel&quot; on the dialog, it returns a value of &quot;False&quot;. I tested for this condition so that when the user clicks Cancel and my function eventually tries to call &quot;ExcelAppObj.Quit&quot; it first sets DisplayAlerts = false so that the user doesn&#039;t receive a dialog asking if they&#039;d like to save the changes made to the excel file.</description>
		<content:encoded><![CDATA[<p>An application I just had for this:</p>
<p>I had an Access VBA function open up an instance of excel, make some changes to a file in the background, and bring up a &#8220;Save As&#8221; dialog. If the user clicks &#8220;Cancel&#8221; on the dialog, it returns a value of &#8220;False&#8221;. I tested for this condition so that when the user clicks Cancel and my function eventually tries to call &#8220;ExcelAppObj.Quit&#8221; it first sets DisplayAlerts = false so that the user doesn&#8217;t receive a dialog asking if they&#8217;d like to save the changes made to the excel file.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott</title>
		<link>http://www.automateexcel.com/2004/10/22/excel_vba_exit_without_saving/comment-page-1/#comment-1731</link>
		<dc:creator>Scott</dc:creator>
		<pubDate>Tue, 19 Oct 2010 16:46:04 +0000</pubDate>
		<guid isPermaLink="false">#comment-1731</guid>
		<description>Another great application for this is for testing string manipulation code, but not preserving the changes. 

Say you want to create some code to remove carriage returns from cells in hundreds of different workbooks, testing the batch code will throw up a &quot;Save changes?&quot; dialog each time you try to close the workbook and access another. By suppressing the warnings (and assuming you are using some sort of internal cataloging method to test that your code is doing it&#039;s job, debug.print being a simple way to do so) you can quickly test the batch-readiness of your code.

Thanks for the tips!</description>
		<content:encoded><![CDATA[<p>Another great application for this is for testing string manipulation code, but not preserving the changes. </p>
<p>Say you want to create some code to remove carriage returns from cells in hundreds of different workbooks, testing the batch code will throw up a &#8220;Save changes?&#8221; dialog each time you try to close the workbook and access another. By suppressing the warnings (and assuming you are using some sort of internal cataloging method to test that your code is doing it&#8217;s job, debug.print being a simple way to do so) you can quickly test the batch-readiness of your code.</p>
<p>Thanks for the tips!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John D</title>
		<link>http://www.automateexcel.com/2004/10/22/excel_vba_exit_without_saving/comment-page-1/#comment-1661</link>
		<dc:creator>John D</dc:creator>
		<pubDate>Tue, 17 Aug 2010 15:34:40 +0000</pubDate>
		<guid isPermaLink="false">#comment-1661</guid>
		<description>This code really helped me for a small project I&#039;m doing, thanks a bunch!</description>
		<content:encoded><![CDATA[<p>This code really helped me for a small project I&#8217;m doing, thanks a bunch!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Keith Bricknell</title>
		<link>http://www.automateexcel.com/2004/10/22/excel_vba_exit_without_saving/comment-page-1/#comment-1266</link>
		<dc:creator>Keith Bricknell</dc:creator>
		<pubDate>Wed, 24 Jun 2009 14:10:18 +0000</pubDate>
		<guid isPermaLink="false">#comment-1266</guid>
		<description>Set up a scheduled task to open excel, query an sql database, create a new (non-query) workbook with the results.  Attached the new workbook to an email and sent it.

works a treat, the only bit I was missing was displayalerts = false!  

thanks!!!!</description>
		<content:encoded><![CDATA[<p>Set up a scheduled task to open excel, query an sql database, create a new (non-query) workbook with the results.  Attached the new workbook to an email and sent it.</p>
<p>works a treat, the only bit I was missing was displayalerts = false!  </p>
<p>thanks!!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Monit</title>
		<link>http://www.automateexcel.com/2004/10/22/excel_vba_exit_without_saving/comment-page-1/#comment-1225</link>
		<dc:creator>Monit</dc:creator>
		<pubDate>Fri, 15 May 2009 05:56:11 +0000</pubDate>
		<guid isPermaLink="false">#comment-1225</guid>
		<description>Worked for me... thanks</description>
		<content:encoded><![CDATA[<p>Worked for me&#8230; thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brendan</title>
		<link>http://www.automateexcel.com/2004/10/22/excel_vba_exit_without_saving/comment-page-1/#comment-1087</link>
		<dc:creator>Brendan</dc:creator>
		<pubDate>Thu, 04 Dec 2008 01:41:44 +0000</pubDate>
		<guid isPermaLink="false">#comment-1087</guid>
		<description>@ross, mark.

Might not be particularly useful in general Excel use, but has a fantastic use in programming Excel from other applications using COM automation.

appExcel.DisplayAlerts = False
appExcel.Quit

Inside the exception procedure if something else gets ballsed up. This prevents having a hundred EXCEL.EXE processes in the background while you&#039;re debugging, because every &quot;New Excel.Application&quot; spawns a new Excel process.</description>
		<content:encoded><![CDATA[<p>@ross, mark.</p>
<p>Might not be particularly useful in general Excel use, but has a fantastic use in programming Excel from other applications using COM automation.</p>
<p>appExcel.DisplayAlerts = False<br />
appExcel.Quit</p>
<p>Inside the exception procedure if something else gets ballsed up. This prevents having a hundred EXCEL.EXE processes in the background while you&#8217;re debugging, because every &#8220;New Excel.Application&#8221; spawns a new Excel process.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

