<?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: Closing a Workbook Without a Prompt</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2004/04/22/closing-a-workbook-without-a-prompt/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2004/04/22/closing-a-workbook-without-a-prompt/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Tue, 07 Feb 2012 23:32:04 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: JtL</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/04/22/closing-a-workbook-without-a-prompt/#comment-38393</link>
		<dc:creator>JtL</dc:creator>
		<pubDate>Mon, 09 Mar 2009 20:38:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=489#comment-38393</guid>
		<description>&lt;p&gt;Try something like this:&lt;/p&gt;
&lt;p&gt;Sub Protect_close_spreadsheets()&lt;/p&gt;
&lt;p&gt;Dim ws As Worksheet&lt;/p&gt;
&lt;p&gt;For Each ws In ActiveWorkbook.Worksheets&lt;br&gt;
ws.Protect Password:=&quot;pswd&quot;, DrawingObjects:=True, Contents:=True, Scenarios:=True&lt;br&gt;
Next&lt;/p&gt;
&lt;p&gt;ThisWorkbook.Close SaveChanges:=True&lt;/p&gt;
&lt;p&gt;End Sub&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Try something like this:</p>
<p>Sub Protect_close_spreadsheets()</p>
<p>Dim ws As Worksheet</p>
<p>For Each ws In ActiveWorkbook.Worksheets<br />
ws.Protect Password:=&#8221;pswd&#8221;, DrawingObjects:=True, Contents:=True, Scenarios:=True<br />
Next</p>
<p>ThisWorkbook.Close SaveChanges:=True</p>
<p>End Sub</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: candice</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/04/22/closing-a-workbook-without-a-prompt/#comment-30868</link>
		<dc:creator>candice</dc:creator>
		<pubDate>Fri, 22 Feb 2008 05:21:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=489#comment-30868</guid>
		<description>&lt;p&gt;I have jus started learning vba programming, and I had been trying to do this:&lt;br&gt;
I want to protect all the sheets in a workbook when I close the workbook. How can I do that?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I have jus started learning vba programming, and I had been trying to do this:<br />
I want to protect all the sheets in a workbook when I close the workbook. How can I do that?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Graham</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/04/22/closing-a-workbook-without-a-prompt/#comment-15886</link>
		<dc:creator>Graham</dc:creator>
		<pubDate>Mon, 12 Sep 2005 14:53:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=489#comment-15886</guid>
		<description>&lt;p&gt;Is there a way to stop the prompt from appearing when the spreadsheet is opened in Internet Explorer?&lt;/p&gt;
&lt;p&gt;The examples above only seem to work when the spreadsheet is opened in Excel.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Is there a way to stop the prompt from appearing when the spreadsheet is opened in Internet Explorer?</p>
<p>The examples above only seem to work when the spreadsheet is opened in Excel.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Varatharajan</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/04/22/closing-a-workbook-without-a-prompt/#comment-13930</link>
		<dc:creator>Varatharajan</dc:creator>
		<pubDate>Wed, 15 Jun 2005 08:04:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=489#comment-13930</guid>
		<description>&lt;p&gt;Dear Sir,&lt;br&gt;
I am Using Excel File in VB.&lt;br&gt;
I closed the Excel File before that i Saved the Excel.&lt;br&gt;
I Could not open the Excel file Until i come out from the VB Application.&lt;/p&gt;
&lt;p&gt;xlWorkbook.saveas (Path)&lt;br&gt;
xlWorkbook.close&lt;br&gt;
set xlWorkbook=nothing&lt;br&gt;
set xlApplication=Nothing&lt;/p&gt;
&lt;p&gt;Regards,&lt;br&gt;
Varatharajan.R&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Dear Sir,<br />
I am Using Excel File in VB.<br />
I closed the Excel File before that i Saved the Excel.<br />
I Could not open the Excel file Until i come out from the VB Application.</p>
<p>xlWorkbook.saveas (Path)<br />
xlWorkbook.close<br />
set xlWorkbook=nothing<br />
set xlApplication=Nothing</p>
<p>Regards,<br />
Varatharajan.R</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/04/22/closing-a-workbook-without-a-prompt/#comment-1399</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Fri, 08 Oct 2004 19:50:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=489#comment-1399</guid>
		<description>&lt;p&gt;Here&#039;s the syntax you need:&lt;/p&gt;
&lt;p&gt;Workbooks(&quot;bookname.xls&quot;).Close&lt;/p&gt;
&lt;p&gt;You don&#039;t need the path. If you have set a variable to the workbook, you can use the variable:&lt;/p&gt;
&lt;p&gt;wbWorkbook.Close&lt;/p&gt;
&lt;p&gt;- Jon&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Here&#8217;s the syntax you need:</p>
<p>Workbooks(&#8220;bookname.xls&#8221;).Close</p>
<p>You don&#8217;t need the path. If you have set a variable to the workbook, you can use the variable:</p>
<p>wbWorkbook.Close</p>
<p>- Jon</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JD</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/04/22/closing-a-workbook-without-a-prompt/#comment-1398</link>
		<dc:creator>JD</dc:creator>
		<pubDate>Fri, 08 Oct 2004 17:57:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=489#comment-1398</guid>
		<description>&lt;p&gt;What if I want to close a workbook that I&#039;m not working in?  For example, I&#039;m opening a workbook, copying some values, and then I want it to close without doing anything but running a macro.  I tried a &quot;workbook.close (sPath &amp; workbook.xls)&quot; but no such luck.... any ideas?!?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>What if I want to close a workbook that I&#8217;m not working in?  For example, I&#8217;m opening a workbook, copying some values, and then I want it to close without doing anything but running a macro.  I tried a &#8220;workbook.close (sPath &amp; workbook.xls)&#8221; but no such luck&#8230;. any ideas?!?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shane</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/04/22/closing-a-workbook-without-a-prompt/#comment-1397</link>
		<dc:creator>Shane</dc:creator>
		<pubDate>Mon, 26 Jul 2004 20:11:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=489#comment-1397</guid>
		<description>&lt;p&gt;In Excel 2000 SP3 we have run accross a situation where we cannot set the Saved property to True.  We have a COM add-in and after stepping through the code we discovered that the Saved property is still False right after the line the sets it to True is exectued.  This is occuring in the OnBeforeClose event handler.  Has anyone experienced this or have any recommendations on how to handle this?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>In Excel 2000 SP3 we have run accross a situation where we cannot set the Saved property to True.  We have a COM add-in and after stepping through the code we discovered that the Saved property is still False right after the line the sets it to True is exectued.  This is occuring in the OnBeforeClose event handler.  Has anyone experienced this or have any recommendations on how to handle this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dick</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/04/22/closing-a-workbook-without-a-prompt/#comment-1396</link>
		<dc:creator>Dick</dc:creator>
		<pubDate>Tue, 15 Jun 2004 16:37:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=489#comment-1396</guid>
		<description>&lt;p&gt;Joseph:  If the workbook is unsaved, you need to use the SaveAs method&lt;/p&gt;
&lt;p&gt;ThisWorkbook.SaveAs &quot;C:Mybook.xls&quot;&lt;/p&gt;
&lt;p&gt;to save it before you Close.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Joseph:  If the workbook is unsaved, you need to use the SaveAs method</p>
<p>ThisWorkbook.SaveAs &#8220;C:Mybook.xls&#8221;</p>
<p>to save it before you Close.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joseph</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/04/22/closing-a-workbook-without-a-prompt/#comment-1395</link>
		<dc:creator>Joseph</dc:creator>
		<pubDate>Tue, 15 Jun 2004 09:12:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=489#comment-1395</guid>
		<description>&lt;p&gt;if i&#039;m using method 3, how do i set the workbook name before i closed it.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>if i&#8217;m using method 3, how do i set the workbook name before i closed it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Juan Pablo</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/04/22/closing-a-workbook-without-a-prompt/#comment-1394</link>
		<dc:creator>Juan Pablo</dc:creator>
		<pubDate>Fri, 23 Apr 2004 19:35:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=489#comment-1394</guid>
		<description>&lt;p&gt;Mark, you can use method 3 for that too, just read Dick&#039;s comments again... just change the SaveChanges parameter to False, like this:&lt;/p&gt;
&lt;p&gt;ThisWorkbook.Close SaveChanges:=False&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Mark, you can use method 3 for that too, just read Dick&#8217;s comments again&#8230; just change the SaveChanges parameter to False, like this:</p>
<p>ThisWorkbook.Close SaveChanges:=False</p>
]]></content:encoded>
	</item>
</channel>
</rss>

