<?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: Quick Move</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2009/08/07/quick-move/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2009/08/07/quick-move/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Thu, 09 Feb 2012 18:06:07 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Dick Kusleika</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/08/07/quick-move/#comment-40547</link>
		<dc:creator>Dick Kusleika</dc:creator>
		<pubDate>Sun, 09 Aug 2009 20:53:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2780#comment-40547</guid>
		<description>&lt;p&gt;Yeah, that&#039;s better.  I need to name wb something different like wbOriginal or wbCaller and it will be even clearer.  Thanks Bob.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Yeah, that&#8217;s better.  I need to name wb something different like wbOriginal or wbCaller and it will be even clearer.  Thanks Bob.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob Phillips</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/08/07/quick-move/#comment-40544</link>
		<dc:creator>Bob Phillips</dc:creator>
		<pubDate>Sun, 09 Aug 2009 17:30:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2780#comment-40544</guid>
		<description>&lt;p&gt;Dick,&lt;/p&gt;
&lt;p&gt;I realised why you captured it, just felt it looked odd. It is the sort of thing that the next guy who maintains the code might think, this sh variable is only used in one place, I can easily delete it and use ACtivesheet where it is used.&lt;/p&gt;
&lt;p&gt;As you want to capture the original workbook to close, I would use&lt;/p&gt;
&lt;div style=&quot;overflow: auto; white-space: nowrap;&quot; class=&quot;codecolorer-container vb default&quot;&gt;&lt;div style=&quot;white-space: nowrap;&quot; class=&quot;vb codecolorer&quot;&gt;&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Set&lt;/span&gt; wb = ActiveSheet.Parent&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;If&lt;/span&gt; bNewWorkbook &lt;span class=&quot;kw1&quot;&gt;Then&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; ActiveSheet.Copy&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Else&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; ActiveSheet.Copy shAfter&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;If&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; wb.&lt;span class=&quot;kw1&quot;&gt;Close&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;False&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Else&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;If&lt;/span&gt; bNewWorkbook &lt;span class=&quot;kw1&quot;&gt;Then&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; ActiveSheet.Copy&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Else&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; ActiveSheet.Copy shAfter&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;If&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;If&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;that way you use Activesheet which you think is clearer, you don&#039;t have the apparent inconsistency, and your intent is actually clearer.&lt;/p&gt;
&lt;p&gt;All in the cause of &#039;Defensive Programming&#039;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Dick,</p>
<p>I realised why you captured it, just felt it looked odd. It is the sort of thing that the next guy who maintains the code might think, this sh variable is only used in one place, I can easily delete it and use ACtivesheet where it is used.</p>
<p>As you want to capture the original workbook to close, I would use</p>
<div style="overflow: auto; white-space: nowrap;" class="codecolorer-container vb default">
<div style="white-space: nowrap;" class="vb codecolorer">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">Set</span> wb = ActiveSheet.Parent<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">If</span> bNewWorkbook <span class="kw1">Then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ActiveSheet.Copy<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">Else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ActiveSheet.Copy shAfter<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">End</span> <span class="kw1">If</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; wb.<span class="kw1">Close</span> <span class="kw1">False</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">Else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">If</span> bNewWorkbook <span class="kw1">Then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ActiveSheet.Copy<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">Else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ActiveSheet.Copy shAfter<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">End</span> <span class="kw1">If</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">End</span> <span class="kw1">If</span></div>
</div>
<p>that way you use Activesheet which you think is clearer, you don&#8217;t have the apparent inconsistency, and your intent is actually clearer.</p>
<p>All in the cause of &#8216;Defensive Programming&#8217;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dick Kusleika</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/08/07/quick-move/#comment-40534</link>
		<dc:creator>Dick Kusleika</dc:creator>
		<pubDate>Sun, 09 Aug 2009 00:10:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2780#comment-40534</guid>
		<description>&lt;p&gt;I want to use Activesheet.  I store it in Sh so I can do the sh.Parent.Close after the activesheet has changed, but I think using Activesheet is clearer.  I hadn&#039;t thought about how that looks until you mention it.  Good point on the optional argument - you don&#039;t think I would ever forget an optional argument when I needed it do you? :)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I want to use Activesheet.  I store it in Sh so I can do the sh.Parent.Close after the activesheet has changed, but I think using Activesheet is clearer.  I hadn&#8217;t thought about how that looks until you mention it.  Good point on the optional argument &#8211; you don&#8217;t think I would ever forget an optional argument when I needed it do you? <img src='http://www.dailydoseofexcel.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob Phillips</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/08/07/quick-move/#comment-40529</link>
		<dc:creator>Bob Phillips</dc:creator>
		<pubDate>Sat, 08 Aug 2009 11:05:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2780#comment-40529</guid>
		<description>&lt;p&gt;Two comments on the moving sheets code.&lt;/p&gt;
&lt;p&gt;You set sh to Activesheet, then continue to use Activesheet in the code.&lt;/p&gt;
&lt;p&gt;shAfter is an optional argument, but you do not test in the code whether it is present or not and take mitigating action, so if it is not passed, the code could fail.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Two comments on the moving sheets code.</p>
<p>You set sh to Activesheet, then continue to use Activesheet in the code.</p>
<p>shAfter is an optional argument, but you do not test in the code whether it is present or not and take mitigating action, so if it is not passed, the code could fail.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hans Schraven</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/08/07/quick-move/#comment-40520</link>
		<dc:creator>Hans Schraven</dc:creator>
		<pubDate>Fri, 07 Aug 2009 16:22:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2780#comment-40520</guid>
		<description>&lt;p&gt;My idea:&lt;/p&gt;
&lt;div style=&quot;overflow: auto; white-space: nowrap;&quot; class=&quot;codecolorer-container vb default&quot;&gt;&lt;div style=&quot;white-space: nowrap;&quot; class=&quot;vb codecolorer&quot;&gt;&lt;span class=&quot;kw1&quot;&gt;Private&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Sub&lt;/span&gt; UserForm_Activate()&lt;br&gt;
&#160; lbxWorkbooks.Tag = &lt;span class=&quot;st0&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;br&gt;
&#160; &lt;span class=&quot;kw1&quot;&gt;For&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Each&lt;/span&gt; wb &lt;span class=&quot;kw1&quot;&gt;In&lt;/span&gt; Application.Windows&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;If&lt;/span&gt; wb.Parent.Name &#160;ActiveWorkbook.Name &lt;span class=&quot;kw1&quot;&gt;And&lt;/span&gt; wb.Visible &lt;span class=&quot;kw1&quot;&gt;Then&lt;/span&gt; lbxWorkbooks.Tag = lbxWorkbooks.Tag &amp; wb.Parent.Name &amp; &lt;span class=&quot;st0&quot;&gt;&quot;&#124;&quot;&lt;/span&gt;&lt;br&gt;
&#160; &lt;span class=&quot;kw1&quot;&gt;Next&lt;/span&gt;&lt;br&gt;
&#160; lbxWorkbooks.List = Split(lbxWorkbooks.Tag &amp; &lt;span class=&quot;st0&quot;&gt;&quot;New Workbook&quot;&lt;/span&gt;, &lt;span class=&quot;st0&quot;&gt;&quot;&#124;&quot;&lt;/span&gt;)&lt;br&gt;
&#160; &#160; &lt;br&gt;
&#160; cmdCopy.Visible = lbxWorkbooks.ListCount &gt; 0&lt;br&gt;
&#160; cmdMove.Visible = cmdCopy.Visible&lt;br&gt;
&lt;br&gt;
&#160; &lt;span class=&quot;kw1&quot;&gt;If&lt;/span&gt; lbxWorkbooks.ListCount &gt; 0 &lt;span class=&quot;kw1&quot;&gt;Then&lt;/span&gt; lbxWorkbooks.Selected(0) = &lt;span class=&quot;kw1&quot;&gt;True&lt;/span&gt;&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Sub&lt;/span&gt;&lt;br&gt;
&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;Private&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Sub&lt;/span&gt; cmdCancel_Click()&lt;br&gt;
&#160; Hide&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Sub&lt;/span&gt;&lt;br&gt;
&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;Private&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Sub&lt;/span&gt; cmdCopy_Click()&lt;br&gt;
&#160; CopyMoveSheet&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Sub&lt;/span&gt;&lt;br&gt;
&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;Private&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Sub&lt;/span&gt; cmdMove_Click()&lt;br&gt;
&#160; Application.DisplayAlerts = &lt;span class=&quot;kw1&quot;&gt;False&lt;/span&gt;&lt;br&gt;
&#160; &lt;span class=&quot;kw1&quot;&gt;With&lt;/span&gt; ActiveSheet&lt;br&gt;
&#160; &#160; cmdMove.Tag = .Parent.Name&lt;br&gt;
&#160; &#160; cmdCopy.Tag = .Name&lt;br&gt;
&#160; &#160; cmdCancel.Tag = .Parent.Path&lt;br&gt;
&#160; &lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;With&lt;/span&gt;&lt;br&gt;
&#160; &#160; &lt;br&gt;
&#160; CopyMoveSheet&lt;br&gt;
&#160; &#160; &lt;br&gt;
&#160; &lt;span class=&quot;kw1&quot;&gt;With&lt;/span&gt; Workbooks(cmdMove.Tag)&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;If&lt;/span&gt; InStr(&lt;span class=&quot;st0&quot;&gt;&quot;.txt.csv&quot;&lt;/span&gt;, Right(cmdMove.Tag, 4)) &gt; 0 &lt;span class=&quot;kw1&quot;&gt;Or&lt;/span&gt; cmdCancel.Tag = &lt;span class=&quot;st0&quot;&gt;&quot;&quot;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Then&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; .&lt;span class=&quot;kw1&quot;&gt;Close&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;False&lt;/span&gt;&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;ElseIf&lt;/span&gt; .Sheets.Count &gt; 1 &lt;span class=&quot;kw1&quot;&gt;Then&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; .Sheets(cmdCopy.Tag).Delete&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;If&lt;/span&gt;&lt;br&gt;
&#160; &lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;With&lt;/span&gt;&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Sub&lt;/span&gt;&lt;br&gt;
&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;Private&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Sub&lt;/span&gt; CopyMoveSheet()&lt;br&gt;
&#160; &lt;span class=&quot;kw1&quot;&gt;If&lt;/span&gt; lbxWorkbooks.Value = &lt;span class=&quot;st0&quot;&gt;&quot;New Workbook&quot;&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Then&lt;/span&gt;&lt;br&gt;
&#160; &#160; ActiveSheet.Copy&lt;br&gt;
&#160; &lt;span class=&quot;kw1&quot;&gt;Else&lt;/span&gt;&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;With&lt;/span&gt; Workbooks(lbxWorkbooks.Value)&lt;br&gt;
&#160; &#160; &#160; ActiveSheet.Copy , .Sheets(.Sheets.Count)&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;With&lt;/span&gt;&lt;br&gt;
&#160; &lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;If&lt;/span&gt;&lt;br&gt;
&#160; Hide&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;End&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Sub&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;
</description>
		<content:encoded><![CDATA[<p>My idea:</p>
<div style="overflow: auto; white-space: nowrap;" class="codecolorer-container vb default">
<div style="white-space: nowrap;" class="vb codecolorer"><span class="kw1">Private</span> <span class="kw1">Sub</span> UserForm_Activate()<br />
&nbsp; lbxWorkbooks.Tag = <span class="st0">&#8220;&#8221;</span><br />
&nbsp; <span class="kw1">For</span> <span class="kw1">Each</span> wb <span class="kw1">In</span> Application.Windows<br />
&nbsp; &nbsp; <span class="kw1">If</span> wb.Parent.Name &nbsp;ActiveWorkbook.Name <span class="kw1">And</span> wb.Visible <span class="kw1">Then</span> lbxWorkbooks.Tag = lbxWorkbooks.Tag &amp;amp; wb.Parent.Name &amp;amp; <span class="st0">&#8220;|&#8221;</span><br />
&nbsp; <span class="kw1">Next</span><br />
&nbsp; lbxWorkbooks.List = Split(lbxWorkbooks.Tag &amp;amp; <span class="st0">&#8220;New Workbook&#8221;</span>, <span class="st0">&#8220;|&#8221;</span>)<br />
&nbsp; &nbsp; <br />
&nbsp; cmdCopy.Visible = lbxWorkbooks.ListCount &amp;gt; 0<br />
&nbsp; cmdMove.Visible = cmdCopy.Visible</p>
<p>&nbsp; <span class="kw1">If</span> lbxWorkbooks.ListCount &amp;gt; 0 <span class="kw1">Then</span> lbxWorkbooks.Selected(0) = <span class="kw1">True</span><br />
<span class="kw1">End</span> <span class="kw1">Sub</span></p>
<p><span class="kw1">Private</span> <span class="kw1">Sub</span> cmdCancel_Click()<br />
&nbsp; Hide<br />
<span class="kw1">End</span> <span class="kw1">Sub</span></p>
<p><span class="kw1">Private</span> <span class="kw1">Sub</span> cmdCopy_Click()<br />
&nbsp; CopyMoveSheet<br />
<span class="kw1">End</span> <span class="kw1">Sub</span></p>
<p><span class="kw1">Private</span> <span class="kw1">Sub</span> cmdMove_Click()<br />
&nbsp; Application.DisplayAlerts = <span class="kw1">False</span><br />
&nbsp; <span class="kw1">With</span> ActiveSheet<br />
&nbsp; &nbsp; cmdMove.Tag = .Parent.Name<br />
&nbsp; &nbsp; cmdCopy.Tag = .Name<br />
&nbsp; &nbsp; cmdCancel.Tag = .Parent.Path<br />
&nbsp; <span class="kw1">End</span> <span class="kw1">With</span><br />
&nbsp; &nbsp; <br />
&nbsp; CopyMoveSheet<br />
&nbsp; &nbsp; <br />
&nbsp; <span class="kw1">With</span> Workbooks(cmdMove.Tag)<br />
&nbsp; &nbsp; <span class="kw1">If</span> InStr(<span class="st0">&#8220;.txt.csv&#8221;</span>, Right(cmdMove.Tag, 4)) &amp;gt; 0 <span class="kw1">Or</span> cmdCancel.Tag = <span class="st0">&#8220;&#8221;</span> <span class="kw1">Then</span><br />
&nbsp; &nbsp; &nbsp; .<span class="kw1">Close</span> <span class="kw1">False</span><br />
&nbsp; &nbsp; <span class="kw1">ElseIf</span> .Sheets.Count &amp;gt; 1 <span class="kw1">Then</span><br />
&nbsp; &nbsp; &nbsp; .Sheets(cmdCopy.Tag).Delete<br />
&nbsp; &nbsp; <span class="kw1">End</span> <span class="kw1">If</span><br />
&nbsp; <span class="kw1">End</span> <span class="kw1">With</span><br />
<span class="kw1">End</span> <span class="kw1">Sub</span></p>
<p><span class="kw1">Private</span> <span class="kw1">Sub</span> CopyMoveSheet()<br />
&nbsp; <span class="kw1">If</span> lbxWorkbooks.Value = <span class="st0">&#8220;New Workbook&#8221;</span> <span class="kw1">Then</span><br />
&nbsp; &nbsp; ActiveSheet.Copy<br />
&nbsp; <span class="kw1">Else</span><br />
&nbsp; &nbsp; <span class="kw1">With</span> Workbooks(lbxWorkbooks.Value)<br />
&nbsp; &nbsp; &nbsp; ActiveSheet.Copy , .Sheets(.Sheets.Count)<br />
&nbsp; &nbsp; <span class="kw1">End</span> <span class="kw1">With</span><br />
&nbsp; <span class="kw1">End</span> <span class="kw1">If</span><br />
&nbsp; Hide<br />
<span class="kw1">End</span> <span class="kw1">Sub</span></div>
</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: JP</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/08/07/quick-move/#comment-40519</link>
		<dc:creator>JP</dc:creator>
		<pubDate>Fri, 07 Aug 2009 15:11:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2780#comment-40519</guid>
		<description>&lt;p&gt;You should set up a separate page with all your downloads. It will be easier than jumping around to different pages to find everything.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>You should set up a separate page with all your downloads. It will be easier than jumping around to different pages to find everything.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

