<?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: Three Porting Issues</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2008/10/01/three-porting-issues/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2008/10/01/three-porting-issues/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Wed, 08 Feb 2012 23:58:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Bernar</title>
		<link>http://www.dailydoseofexcel.com/archives/2008/10/01/three-porting-issues/#comment-35722</link>
		<dc:creator>Bernar</dc:creator>
		<pubDate>Wed, 22 Oct 2008 13:23:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1898#comment-35722</guid>
		<description>&lt;p&gt;Love your postings!  &lt;/p&gt;
&lt;p&gt;Based on an example of capturing commas in text in CSV files, I looked up the &quot;instr&quot; command.  I noticed many of the commands for manipulating text also hav a &quot;b&quot; or &quot;$&quot; or both.  Can someone explain the difference between &quot;instr&quot; and &quot;instrb&quot; or &quot;rightB&quot; and &quot;rightB$&quot;.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Love your postings!  </p>
<p>Based on an example of capturing commas in text in CSV files, I looked up the &#8220;instr&#8221; command.  I noticed many of the commands for manipulating text also hav a &#8220;b&#8221; or &#8220;$&#8221; or both.  Can someone explain the difference between &#8220;instr&#8221; and &#8220;instrb&#8221; or &#8220;rightB&#8221; and &#8220;rightB$&#8221;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sam</title>
		<link>http://www.dailydoseofexcel.com/archives/2008/10/01/three-porting-issues/#comment-34955</link>
		<dc:creator>sam</dc:creator>
		<pubDate>Sat, 04 Oct 2008 04:45:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1898#comment-34955</guid>
		<description>&lt;p&gt;@fzz&lt;/p&gt;
&lt;p&gt;Also I just added&lt;br&gt;
Set ActiveSheet.UsedRange = r&lt;br&gt;
ActiveWorkbook.save&lt;/p&gt;
&lt;p&gt;It did not reset the UsedRange (Ctr+End - still takes me to the wrong used range&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@fzz</p>
<p>Also I just added<br />
Set ActiveSheet.UsedRange = r<br />
ActiveWorkbook.save</p>
<p>It did not reset the UsedRange (Ctr+End &#8211; still takes me to the wrong used range</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dick Kusleika</title>
		<link>http://www.dailydoseofexcel.com/archives/2008/10/01/three-porting-issues/#comment-34949</link>
		<dc:creator>Dick Kusleika</dc:creator>
		<pubDate>Fri, 03 Oct 2008 13:34:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1898#comment-34949</guid>
		<description>&lt;p&gt;Issue 4:  I have a range named &quot;rep4? which is perfectly fine in 2003.  But with the expanded columns in 2007, REP4 is now a cell reference.  Excel 2007 seems to fix this automatically by changing the name to &quot;_rep4?, but it won&#039;t check VBA code.  A quick Find in the VBE determined that I wasn&#039;t using that range name in code.&lt;/p&gt;
&lt;p&gt;Normally, I prefix my range names, such as rngRep4 for a range reference or conRep4 for a constant value.   For some reason I didn&#039;t prefix this one.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Issue 4:  I have a range named &#8220;rep4? which is perfectly fine in 2003.  But with the expanded columns in 2007, REP4 is now a cell reference.  Excel 2007 seems to fix this automatically by changing the name to &#8220;_rep4?, but it won&#8217;t check VBA code.  A quick Find in the VBE determined that I wasn&#8217;t using that range name in code.</p>
<p>Normally, I prefix my range names, such as rngRep4 for a range reference or conRep4 for a constant value.   For some reason I didn&#8217;t prefix this one.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charlie Hall</title>
		<link>http://www.dailydoseofexcel.com/archives/2008/10/01/three-porting-issues/#comment-34936</link>
		<dc:creator>Charlie Hall</dc:creator>
		<pubDate>Thu, 02 Oct 2008 21:43:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1898#comment-34936</guid>
		<description>&lt;p&gt;@fzz:&lt;br&gt;
I tried your alternate technique, but it did not find the actual used range - in my test example, there is only one cell in the first column in the last row.  Your lc range found this cell and then returned the used range as just the first column.  Only if the last cell is at the most rightmost edge of the range will the technique work - any other alternate approaches - I can not think of how to improve on yours.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@fzz:<br />
I tried your alternate technique, but it did not find the actual used range &#8211; in my test example, there is only one cell in the first column in the last row.  Your lc range found this cell and then returned the used range as just the first column.  Only if the last cell is at the most rightmost edge of the range will the technique work &#8211; any other alternate approaches &#8211; I can not think of how to improve on yours.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick O'Beirne</title>
		<link>http://www.dailydoseofexcel.com/archives/2008/10/01/three-porting-issues/#comment-34926</link>
		<dc:creator>Patrick O'Beirne</dc:creator>
		<pubDate>Thu, 02 Oct 2008 09:40:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1898#comment-34926</guid>
		<description>&lt;p&gt;As I recall, the Find method for usedrange also comes up short if there are merged cells at the edge of the range.&lt;br&gt;
For the DSO thing see ttp://www.cpearson.com/excel/docprop.htm&lt;br&gt;
&#039;Document Properties Of Closed Files DSO Version 2.0&lt;br&gt;
&#039;The following code illustrates how to read document properties using DSO version 2.0.&lt;br&gt;
&#039;You can download DSO Version 2.0 from Microsoft at&lt;br&gt;
&#039;http://www.microsoft.com/downloads/details.aspx?FamilyID=9ba6fac6-520b-4a0a-878a-53ec8300c4c2&amp;DisplayLang=en&lt;br&gt;
Function DSOODP()&lt;br&gt;
Dim DSO As DSOFile.OleDocumentProperties&lt;br&gt;
 &#039; requires project to have reference to DSO OLE Document Properties Reader 2.0&lt;br&gt;
Set DSO = New DSOFile.OleDocumentProperties&lt;br&gt;
DSO.Open sfilename:=&quot;F:dirfile.xls&quot;&lt;br&gt;
Debug.Print DSO.SummaryProperties.ApplicationName&lt;br&gt;
Debug.Print DSO.SummaryProperties.Author&lt;br&gt;
 &#039; lots of other properties, cannot be accessed by text of name in a variable&lt;br&gt;
DSO.Close&lt;br&gt;
End Function&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>As I recall, the Find method for usedrange also comes up short if there are merged cells at the edge of the range.<br />
For the DSO thing see ttp://www.cpearson.com/excel/docprop.htm<br />
&#8216;Document Properties Of Closed Files DSO Version 2.0<br />
&#8216;The following code illustrates how to read document properties using DSO version 2.0.<br />
&#8216;You can download DSO Version 2.0 from Microsoft at<br />
&#8216;<a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=9ba6fac6-520b-4a0a-878a-53ec8300c4c2&#038;DisplayLang=en" rel="nofollow">http://www.microsoft.com/downloads/details.aspx?FamilyID=9ba6fac6-520b-4a0a-878a-53ec8300c4c2&#038;DisplayLang=en</a><br />
Function DSOODP()<br />
Dim DSO As DSOFile.OleDocumentProperties<br />
 &#8216; requires project to have reference to DSO OLE Document Properties Reader 2.0<br />
Set DSO = New DSOFile.OleDocumentProperties<br />
DSO.Open sfilename:=&#8221;F:dirfile.xls&#8221;<br />
Debug.Print DSO.SummaryProperties.ApplicationName<br />
Debug.Print DSO.SummaryProperties.Author<br />
 &#8216; lots of other properties, cannot be accessed by text of name in a variable<br />
DSO.Close<br />
End Function</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://www.dailydoseofexcel.com/archives/2008/10/01/three-porting-issues/#comment-34923</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Thu, 02 Oct 2008 03:25:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1898#comment-34923</guid>
		<description>&lt;p&gt;The DSOFile does need to be distributed. Therefore I use it on my machine, but I let other people wait for their machines to open files to read the properties. It&#039;s still good for saving a build number to a custom doc prop prior to creating a new installation exe, and it conveniently also works on pdf files.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>The DSOFile does need to be distributed. Therefore I use it on my machine, but I let other people wait for their machines to open files to read the properties. It&#8217;s still good for saving a build number to a custom doc prop prior to creating a new installation exe, and it conveniently also works on pdf files.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fzz</title>
		<link>http://www.dailydoseofexcel.com/archives/2008/10/01/three-porting-issues/#comment-34922</link>
		<dc:creator>fzz</dc:creator>
		<pubDate>Thu, 02 Oct 2008 02:48:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1898#comment-34922</guid>
		<description>&lt;p&gt;Excel&#039;s UsedRange includes cells with formatting other than the Normal style even if they have no contents. Maybe not a problem for you, but harder to locate.&lt;/p&gt;
&lt;p&gt;Possibly more of a problem, Finding * won&#039;t find cells that &#039;contain&#039; only the label prefix &#039; but have nothing else or cells in which the formula =&quot;&quot; was converted to a value. Such cells also aren&#039;t blank. They&#039;re degenerate text constants.&lt;/p&gt;
&lt;p&gt;More robust to use something like&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;Dim&lt;/span&gt; lc &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; Range, r &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; Range&lt;br&gt;
&lt;br&gt;
&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;
&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;Set&lt;/span&gt; r = ActiveSheet.Cells.SpecialCells(xlCellTypeConstants)&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;If&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Not&lt;/span&gt; r &lt;span class=&quot;kw1&quot;&gt;Is&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Nothing&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Then&lt;/span&gt;&lt;br&gt;
&#160; &lt;span class=&quot;kw1&quot;&gt;Set&lt;/span&gt; r = r.Areas(r.Areas.Count)&lt;br&gt;
&#160; &lt;span class=&quot;kw1&quot;&gt;Set&lt;/span&gt; lc = r.Cells(r.Cells.Count)&lt;br&gt;
&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;
&lt;span class=&quot;kw1&quot;&gt;Set&lt;/span&gt; r = ActiveSheet.Cells.SpecialCells(xlCellTypeFormulas)&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;If&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Not&lt;/span&gt; r &lt;span class=&quot;kw1&quot;&gt;Is&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Nothing&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Then&lt;/span&gt;&lt;br&gt;
&#160; &lt;span class=&quot;kw1&quot;&gt;Set&lt;/span&gt; r = r.Areas(r.Areas.Count)&lt;br&gt;
&#160; &lt;span class=&quot;kw1&quot;&gt;If&lt;/span&gt; lc &lt;span class=&quot;kw1&quot;&gt;Is&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Nothing&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Then&lt;/span&gt;&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Set&lt;/span&gt; lc = r.Cells(r.Cells.Count)&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;Set&lt;/span&gt; r = ActiveSheet.Range(lc, r.Cells(r.Cells.Count))&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Set&lt;/span&gt; lc = r.Cells(r.Cells.Count)&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;
&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;
&lt;span class=&quot;kw1&quot;&gt;With&lt;/span&gt; ActiveSheet&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;If&lt;/span&gt; lc &lt;span class=&quot;kw1&quot;&gt;Is&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Nothing&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Then&lt;/span&gt;&lt;br&gt;
&#160; &lt;span class=&quot;kw1&quot;&gt;Set&lt;/span&gt; r = .Range(&lt;span class=&quot;st0&quot;&gt;&quot;A1&quot;&lt;/span&gt;)&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;Else&lt;/span&gt;&lt;br&gt;
&#160; &lt;span class=&quot;kw1&quot;&gt;Set&lt;/span&gt; r = .Range(.UsedRange.Cells(1), lc)&lt;br&gt;
&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;r is then the portion of the used range with contents.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Excel&#8217;s UsedRange includes cells with formatting other than the Normal style even if they have no contents. Maybe not a problem for you, but harder to locate.</p>
<p>Possibly more of a problem, Finding * won&#8217;t find cells that &#8216;contain&#8217; only the label prefix &#8216; but have nothing else or cells in which the formula =&#8221;" was converted to a value. Such cells also aren&#8217;t blank. They&#8217;re degenerate text constants.</p>
<p>More robust to use something like</p>
<div style="overflow: auto; white-space: nowrap;" class="codecolorer-container vb default">
<div style="white-space: nowrap;" class="vb codecolorer"><span class="kw1">Dim</span> lc <span class="kw1">As</span> Range, r <span class="kw1">As</span> Range</p>
<p><span class="kw1">On</span> <span class="kw1">Error</span> <span class="kw1">Resume</span> <span class="kw1">Next</span></p>
<p><span class="kw1">Set</span> r = ActiveSheet.Cells.SpecialCells(xlCellTypeConstants)<br />
<span class="kw1">If</span> <span class="kw1">Not</span> r <span class="kw1">Is</span> <span class="kw1">Nothing</span> <span class="kw1">Then</span><br />
&nbsp; <span class="kw1">Set</span> r = r.Areas(r.Areas.Count)<br />
&nbsp; <span class="kw1">Set</span> lc = r.Cells(r.Cells.Count)<br />
<span class="kw1">End</span> <span class="kw1">If</span></p>
<p><span class="kw1">Set</span> r = ActiveSheet.Cells.SpecialCells(xlCellTypeFormulas)<br />
<span class="kw1">If</span> <span class="kw1">Not</span> r <span class="kw1">Is</span> <span class="kw1">Nothing</span> <span class="kw1">Then</span><br />
&nbsp; <span class="kw1">Set</span> r = r.Areas(r.Areas.Count)<br />
&nbsp; <span class="kw1">If</span> lc <span class="kw1">Is</span> <span class="kw1">Nothing</span> <span class="kw1">Then</span><br />
&nbsp; &nbsp; <span class="kw1">Set</span> lc = r.Cells(r.Cells.Count)<br />
&nbsp; <span class="kw1">Else</span><br />
&nbsp; &nbsp; <span class="kw1">Set</span> r = ActiveSheet.Range(lc, r.Cells(r.Cells.Count))<br />
&nbsp; &nbsp; <span class="kw1">Set</span> lc = r.Cells(r.Cells.Count)<br />
&nbsp; <span class="kw1">End</span> <span class="kw1">If</span><br />
<span class="kw1">End</span> <span class="kw1">If</span></p>
<p><span class="kw1">With</span> ActiveSheet<br />
<span class="kw1">If</span> lc <span class="kw1">Is</span> <span class="kw1">Nothing</span> <span class="kw1">Then</span><br />
&nbsp; <span class="kw1">Set</span> r = .Range(<span class="st0">&#8220;A1&#8243;</span>)<br />
<span class="kw1">Else</span><br />
&nbsp; <span class="kw1">Set</span> r = .Range(.UsedRange.Cells(1), lc)<br />
<span class="kw1">End</span> <span class="kw1">If</span></div>
</div>
<p>r is then the portion of the used range with contents.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dick Kusleika</title>
		<link>http://www.dailydoseofexcel.com/archives/2008/10/01/three-porting-issues/#comment-34921</link>
		<dc:creator>Dick Kusleika</dc:creator>
		<pubDate>Thu, 02 Oct 2008 02:39:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1898#comment-34921</guid>
		<description>&lt;p&gt;Thanks for the DSOFile tip.  I had enough trouble getting .xla file past IT.  We thought getting them to accept a dll wasn&#039;t worth the trouble.  My understanding is that this file is not installed by default and I would have to distribute it.  I hate dependencies.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thanks for the DSOFile tip.  I had enough trouble getting .xla file past IT.  We thought getting them to accept a dll wasn&#8217;t worth the trouble.  My understanding is that this file is not installed by default and I would have to distribute it.  I hate dependencies.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Peltier</title>
		<link>http://www.dailydoseofexcel.com/archives/2008/10/01/three-porting-issues/#comment-34920</link>
		<dc:creator>Jon Peltier</dc:creator>
		<pubDate>Thu, 02 Oct 2008 01:53:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1898#comment-34920</guid>
		<description>&lt;p&gt;You can use a library called DSOFile to read document properties of closed files. Search Google or MSDN for it.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>You can use a library called DSOFile to read document properties of closed files. Search Google or MSDN for it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: db</title>
		<link>http://www.dailydoseofexcel.com/archives/2008/10/01/three-porting-issues/#comment-34915</link>
		<dc:creator>db</dc:creator>
		<pubDate>Wed, 01 Oct 2008 23:29:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1898#comment-34915</guid>
		<description>&lt;p&gt;Dick, about 10 years ago, I came across this:&lt;br&gt;
DSOFILE.EXE is a self-extracting executable that provides an in-process ActiveX DLL for Visual Basic programmers to use in order to read or modify the Document Summary Properties for an OLE Structured Storage file. Because Word, Excel, and PowerPoint use OLE Structured Storage to save their files to disk, this DLL lets programmers view and change document properties without the need to open the&lt;br&gt;
document in Office.&lt;/p&gt;
&lt;p&gt;I still have this file, plus sample code, if you are interested. And yes, it retrieves custom properties.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Dick, about 10 years ago, I came across this:<br />
DSOFILE.EXE is a self-extracting executable that provides an in-process ActiveX DLL for Visual Basic programmers to use in order to read or modify the Document Summary Properties for an OLE Structured Storage file. Because Word, Excel, and PowerPoint use OLE Structured Storage to save their files to disk, this DLL lets programmers view and change document properties without the need to open the<br />
document in Office.</p>
<p>I still have this file, plus sample code, if you are interested. And yes, it retrieves custom properties.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

