<?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: Zip Activeworkbook, Folder, File or Files with 7-Zip (VBA)</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2009/05/10/zip-activeworkbook-folder-file-or-files-with-7-zip-vba/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2009/05/10/zip-activeworkbook-folder-file-or-files-with-7-zip-vba/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Thu, 09 Feb 2012 23:42:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: John Durbin</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/05/10/zip-activeworkbook-folder-file-or-files-with-7-zip-vba/#comment-55785</link>
		<dc:creator>John Durbin</dc:creator>
		<pubDate>Mon, 13 Dec 2010 23:13:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2472#comment-55785</guid>
		<description>&lt;p&gt;Thank you!&lt;/p&gt;
&lt;p&gt;I did have to make a minor change:&lt;/p&gt;
&lt;p&gt;oApp.Namespace(FileNameZip).CopyHere DefPath &amp; FName(iCtr)&lt;/p&gt;
&lt;p&gt;This will save me a lot of time.  I really appreciate you help and how generous you are with your time and expertise...JD&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thank you!</p>
<p>I did have to make a minor change:</p>
<p>oApp.Namespace(FileNameZip).CopyHere DefPath &amp; FName(iCtr)</p>
<p>This will save me a lot of time.  I really appreciate you help and how generous you are with your time and expertise&#8230;JD</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ron de Bruin</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/05/10/zip-activeworkbook-folder-file-or-files-with-7-zip-vba/#comment-55782</link>
		<dc:creator>Ron de Bruin</dc:creator>
		<pubDate>Mon, 13 Dec 2010 22:17:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2472#comment-55782</guid>
		<description>&lt;p&gt;Hi, Try this untested change for the files in range&lt;br&gt;
 Sheets(&quot;Sheet1?).Range(&quot;A1:A2?)&lt;/p&gt;
&lt;p&gt;You can test if the files exst also when you fill the array if you want&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;Sub&lt;/span&gt; Zip_File_Or_Files()&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Dim&lt;/span&gt; strDate &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;String&lt;/span&gt;, DefPath &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;String&lt;/span&gt;, sFName &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;String&lt;/span&gt;&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Dim&lt;/span&gt; oApp &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Object&lt;/span&gt;, iCtr &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Long&lt;/span&gt;, I &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Long&lt;/span&gt;&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Dim&lt;/span&gt; FName(), vArr, FileNameZip&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Dim&lt;/span&gt; cell &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; Range&lt;br&gt;
&lt;br&gt;
&#160; &#160; DefPath = Application.DefaultFilePath&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;If&lt;/span&gt; Right(DefPath, 1) &lt;&gt; &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; &#160; DefPath = DefPath &amp; &lt;span class=&quot;st0&quot;&gt;&quot;&quot;&lt;/span&gt;&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;
&lt;br&gt;
&#160; &#160; strDate = Format(Now, &lt;span class=&quot;st0&quot;&gt;&quot; dd-mmm-yy h-mm-ss&quot;&lt;/span&gt;)&lt;br&gt;
&#160; &#160; FileNameZip = DefPath &amp; &lt;span class=&quot;st0&quot;&gt;&quot;MyFilesZip &quot;&lt;/span&gt; &amp; strDate &amp; &lt;span class=&quot;st0&quot;&gt;&quot;.zip&quot;&lt;/span&gt;&lt;br&gt;
&lt;br&gt;
&#160; &#160; Fnum = 0&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;For&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Each&lt;/span&gt; cell &lt;span class=&quot;kw1&quot;&gt;In&lt;/span&gt; Sheets(&lt;span class=&quot;st0&quot;&gt;&quot;Sheet1&quot;&lt;/span&gt;).Range(&lt;span class=&quot;st0&quot;&gt;&quot;A1:A3&quot;&lt;/span&gt;)&lt;br&gt;
&#160; &#160; Fnum = Fnum + 1&lt;br&gt;
&#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;ReDim&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Preserve&lt;/span&gt; FName(1 &lt;span class=&quot;kw1&quot;&gt;To&lt;/span&gt; Fnum)&lt;br&gt;
&#160; &#160; &#160; &#160; FName(Fnum) = cell.Value&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Next&lt;/span&gt; cell&lt;br&gt;
&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;If&lt;/span&gt; Fnum &gt; 0 &lt;span class=&quot;kw1&quot;&gt;Then&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; &#160; &lt;span class=&quot;co1&quot;&gt;&#039;Create empty Zip File&lt;br&gt;
&lt;/span&gt; &#160; &#160; &#160; &#160;NewZip (FileNameZip)&lt;br&gt;
&#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Set&lt;/span&gt; oApp = CreateObject(&lt;span class=&quot;st0&quot;&gt;&quot;Shell.Application&quot;&lt;/span&gt;)&lt;br&gt;
&#160; &#160; &#160; &#160; I = 0&lt;br&gt;
&#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;For&lt;/span&gt; iCtr = &lt;span class=&quot;kw1&quot;&gt;LBound&lt;/span&gt;(FName) &lt;span class=&quot;kw1&quot;&gt;To&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;UBound&lt;/span&gt;(FName)&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &lt;span class=&quot;co1&quot;&gt;&#039;Copy the file to the compressed folder&lt;br&gt;
&lt;/span&gt; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;I = I + 1&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; oApp.Namespace(FileNameZip).CopyHere FName(iCtr)&lt;br&gt;
&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &lt;span class=&quot;co1&quot;&gt;&#039;Keep script waiting until Compressing is done&lt;br&gt;
&lt;/span&gt; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;&lt;span class=&quot;kw1&quot;&gt;On&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Error&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Resume&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Next&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Do&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Until&lt;/span&gt; oApp.Namespace(FileNameZip).items.Count = I&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; Application.Wait (Now + TimeValue(&lt;span class=&quot;st0&quot;&gt;&quot;0:00:01&quot;&lt;/span&gt;))&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Loop&lt;/span&gt;&lt;br&gt;
&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;On&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Error&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;GoTo&lt;/span&gt; 0&lt;br&gt;
&#160; &#160; &#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Next&lt;/span&gt; iCtr&lt;br&gt;
&lt;br&gt;
&#160; &#160; &#160; &#160; MsgBox &lt;span class=&quot;st0&quot;&gt;&quot;You find the zipfile here: &quot;&lt;/span&gt; &amp; FileNameZip&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;
&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>Hi, Try this untested change for the files in range<br />
 Sheets(&#8220;Sheet1?).Range(&#8220;A1:A2?)</p>
<p>You can test if the files exst also when you fill the array if you want</p>
<div style="overflow: auto; white-space: nowrap;" class="codecolorer-container vb default">
<div style="white-space: nowrap;" class="vb codecolorer"><span class="kw1">Sub</span> Zip_File_Or_Files()<br />
&nbsp; &nbsp; <span class="kw1">Dim</span> strDate <span class="kw1">As</span> <span class="kw1">String</span>, DefPath <span class="kw1">As</span> <span class="kw1">String</span>, sFName <span class="kw1">As</span> <span class="kw1">String</span><br />
&nbsp; &nbsp; <span class="kw1">Dim</span> oApp <span class="kw1">As</span> <span class="kw1">Object</span>, iCtr <span class="kw1">As</span> <span class="kw1">Long</span>, I <span class="kw1">As</span> <span class="kw1">Long</span><br />
&nbsp; &nbsp; <span class="kw1">Dim</span> FName(), vArr, FileNameZip<br />
&nbsp; &nbsp; <span class="kw1">Dim</span> cell <span class="kw1">As</span> Range</p>
<p>&nbsp; &nbsp; DefPath = Application.DefaultFilePath<br />
&nbsp; &nbsp; <span class="kw1">If</span> Right(DefPath, 1) &lt;&gt; <span class="st0">&#8220;&#8221;</span> <span class="kw1">Then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; DefPath = DefPath &amp; <span class="st0">&#8220;&#8221;</span><br />
&nbsp; &nbsp; <span class="kw1">End</span> <span class="kw1">If</span></p>
<p>&nbsp; &nbsp; strDate = Format(Now, <span class="st0">&#8221; dd-mmm-yy h-mm-ss&#8221;</span>)<br />
&nbsp; &nbsp; FileNameZip = DefPath &amp; <span class="st0">&#8220;MyFilesZip &#8220;</span> &amp; strDate &amp; <span class="st0">&#8220;.zip&#8221;</span></p>
<p>&nbsp; &nbsp; Fnum = 0<br />
&nbsp; &nbsp; <span class="kw1">For</span> <span class="kw1">Each</span> cell <span class="kw1">In</span> Sheets(<span class="st0">&#8220;Sheet1&#8243;</span>).Range(<span class="st0">&#8220;A1:A3&#8243;</span>)<br />
&nbsp; &nbsp; Fnum = Fnum + 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">ReDim</span> <span class="kw1">Preserve</span> FName(1 <span class="kw1">To</span> Fnum)<br />
&nbsp; &nbsp; &nbsp; &nbsp; FName(Fnum) = cell.Value<br />
&nbsp; &nbsp; <span class="kw1">Next</span> cell</p>
<p>&nbsp; &nbsp; <span class="kw1">If</span> Fnum &gt; 0 <span class="kw1">Then</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">&#8216;Create empty Zip File<br />
</span> &nbsp; &nbsp; &nbsp; &nbsp;NewZip (FileNameZip)<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">Set</span> oApp = CreateObject(<span class="st0">&#8220;Shell.Application&#8221;</span>)<br />
&nbsp; &nbsp; &nbsp; &nbsp; I = 0<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">For</span> iCtr = <span class="kw1">LBound</span>(FName) <span class="kw1">To</span> <span class="kw1">UBound</span>(FName)<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">&#8216;Copy the file to the compressed folder<br />
</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;I = I + 1<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; oApp.Namespace(FileNameZip).CopyHere FName(iCtr)</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="co1">&#8216;Keep script waiting until Compressing is done<br />
</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="kw1">On</span> <span class="kw1">Error</span> <span class="kw1">Resume</span> <span class="kw1">Next</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">Do</span> <span class="kw1">Until</span> oApp.Namespace(FileNameZip).items.Count = I<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Application.Wait (Now + TimeValue(<span class="st0">&#8220;0:00:01&#8243;</span>))<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">Loop</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">On</span> <span class="kw1">Error</span> <span class="kw1">GoTo</span> 0<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span class="kw1">Next</span> iCtr</p>
<p>&nbsp; &nbsp; &nbsp; &nbsp; MsgBox <span class="st0">&#8220;You find the zipfile here: &#8220;</span> &amp; FileNameZip<br />
&nbsp; &nbsp; <span class="kw1">End</span> <span class="kw1">If</span><br />
<span class="kw1">End</span> <span class="kw1">Sub</span></div>
</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Durbin</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/05/10/zip-activeworkbook-folder-file-or-files-with-7-zip-vba/#comment-55766</link>
		<dc:creator>John Durbin</dc:creator>
		<pubDate>Mon, 13 Dec 2010 15:53:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2472#comment-55766</guid>
		<description>&lt;p&gt;Hi Ron, I&#039;ve benefited from much code that you have written and I&#039;m wondering if a small tweak is possible to what you&#039;ve written here:  &lt;a href=&quot;http://www.rondebruin.nl/windowsxpzip.htm&quot; rel=&quot;nofollow&quot;&gt;http://www.rondebruin.nl/windowsxpzip.htm&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I&#039;m using the code effectively but what I would prefer to do is NOT use FName = Application.GetOpenFilename as the means to get the file(s).&lt;/p&gt;
&lt;p&gt;Instead I have a spreadsheet with the list of files I want to zip in column A.  My preference is something like:&lt;/p&gt;
&lt;p&gt;FName = Activecell.Value&lt;/p&gt;
&lt;p&gt;or maybe something like:&lt;/p&gt;
&lt;p&gt;Sub DoSomethingToSomeCells()&lt;br&gt;
Dim FName As Range&lt;br&gt;
For Each FName In Selection&lt;br&gt;
&#039;Zip the FName&lt;br&gt;
Next FName&lt;br&gt;
End Sub&lt;/p&gt;
&lt;p&gt;Is this possible?...JD&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi Ron, I&#8217;ve benefited from much code that you have written and I&#8217;m wondering if a small tweak is possible to what you&#8217;ve written here:  <a href="http://www.rondebruin.nl/windowsxpzip.htm" rel="nofollow">http://www.rondebruin.nl/windowsxpzip.htm</a></p>
<p>I&#8217;m using the code effectively but what I would prefer to do is NOT use FName = Application.GetOpenFilename as the means to get the file(s).</p>
<p>Instead I have a spreadsheet with the list of files I want to zip in column A.  My preference is something like:</p>
<p>FName = Activecell.Value</p>
<p>or maybe something like:</p>
<p>Sub DoSomethingToSomeCells()<br />
Dim FName As Range<br />
For Each FName In Selection<br />
&#8216;Zip the FName<br />
Next FName<br />
End Sub</p>
<p>Is this possible?&#8230;JD</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ron de Bruin</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/05/10/zip-activeworkbook-folder-file-or-files-with-7-zip-vba/#comment-39376</link>
		<dc:creator>Ron de Bruin</dc:creator>
		<pubDate>Sun, 17 May 2009 23:38:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2472#comment-39376</guid>
		<description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Good to read that I ma not the only one that like the program&lt;/p&gt;
&lt;p&gt;FYI&lt;/p&gt;
&lt;p&gt;I add the page with a few basic unzip examples&lt;br&gt;
Link is on the Zip page&lt;/p&gt;
&lt;p&gt;Have fun&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>Good to read that I ma not the only one that like the program</p>
<p>FYI</p>
<p>I add the page with a few basic unzip examples<br />
Link is on the Zip page</p>
<p>Have fun</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gruff999</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/05/10/zip-activeworkbook-folder-file-or-files-with-7-zip-vba/#comment-39367</link>
		<dc:creator>gruff999</dc:creator>
		<pubDate>Sat, 16 May 2009 11:18:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2472#comment-39367</guid>
		<description>&lt;p&gt;Agree with comments about 7-zip. I&#039;ve used WinZip with the optional extra install for command-line access, our standard at work is ZipCentral which is o.k. but has no command-line interface and isn&#039;t being developed any further. Read about 7-zip in a magazine and haven&#039;t looked back. Some of the options vary depending on whether you&#039;re creating a .zip or the native 7-zip archive format so there&#039;s some trial and error needed.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Agree with comments about 7-zip. I&#8217;ve used WinZip with the optional extra install for command-line access, our standard at work is ZipCentral which is o.k. but has no command-line interface and isn&#8217;t being developed any further. Read about 7-zip in a magazine and haven&#8217;t looked back. Some of the options vary depending on whether you&#8217;re creating a .zip or the native 7-zip archive format so there&#8217;s some trial and error needed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.dailydoseofexcel.com/archives/2009/05/10/zip-activeworkbook-folder-file-or-files-with-7-zip-vba/#comment-39348</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Fri, 15 May 2009 03:24:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=2472#comment-39348</guid>
		<description>&lt;p&gt;Ron,&lt;br&gt;
7zip is great. I started using it when Windows default zip wouldn&#039;t handle different types of encryption and I find it much better than anything else. Winzip is dead to me.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Ron,<br />
7zip is great. I started using it when Windows default zip wouldn&#8217;t handle different types of encryption and I find it much better than anything else. Winzip is dead to me.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

