<?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: Properties and Objects</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2010/07/12/properties-and-objects/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2010/07/12/properties-and-objects/</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: Jamie Collins</title>
		<link>http://www.dailydoseofexcel.com/archives/2010/07/12/properties-and-objects/#comment-47984</link>
		<dc:creator>Jamie Collins</dc:creator>
		<pubDate>Thu, 15 Jul 2010 08:52:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=4030#comment-47984</guid>
		<description>&lt;p&gt;Dick, I like your approach i.e. you start by saying, &quot;Here&#039;s the code I want to run and have it work&quot; and then you actually write go ahead and the &#039;client side&#039; code before you&#039;ve even started the &#039;server side&#039; (object model) code. This is absolutely key to getting abstraction correct. &lt;/p&gt;
&lt;p&gt;Great series on class modules, BTW. As I may have already hinted, I fully expect articles in the near future on 1) safely referencing a parent object from a child (e.g. add a Public Property Get  Parent() As CWorksheet to the Range object) and 2) subclassing (e.g. a Sheets collection that returns objects of type CWorksheet, CDialogSheet, etc). If not I&#039;ll threaten to dust off my notes and do it myself ;)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Dick, I like your approach i.e. you start by saying, &#8220;Here&#8217;s the code I want to run and have it work&#8221; and then you actually write go ahead and the &#8216;client side&#8217; code before you&#8217;ve even started the &#8216;server side&#8217; (object model) code. This is absolutely key to getting abstraction correct. </p>
<p>Great series on class modules, BTW. As I may have already hinted, I fully expect articles in the near future on 1) safely referencing a parent object from a child (e.g. add a Public Property Get  Parent() As CWorksheet to the Range object) and 2) subclassing (e.g. a Sheets collection that returns objects of type CWorksheet, CDialogSheet, etc). If not I&#8217;ll threaten to dust off my notes and do it myself <img src='http://www.dailydoseofexcel.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jan Karel Pieterse</title>
		<link>http://www.dailydoseofexcel.com/archives/2010/07/12/properties-and-objects/#comment-47900</link>
		<dc:creator>Jan Karel Pieterse</dc:creator>
		<pubDate>Tue, 13 Jul 2010 15:01:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=4030#comment-47900</guid>
		<description>&lt;p&gt;I tend to use it without the wsf and check what I get returned (typename). That way I don&#039;t have to use an error handler or on error resume next stuff. A matter of taste or habit I think.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I tend to use it without the wsf and check what I get returned (typename). That way I don&#8217;t have to use an error handler or on error resume next stuff. A matter of taste or habit I think.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dick Kusleika</title>
		<link>http://www.dailydoseofexcel.com/archives/2010/07/12/properties-and-objects/#comment-47898</link>
		<dc:creator>Dick Kusleika</dc:creator>
		<pubDate>Tue, 13 Jul 2010 14:26:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=4030#comment-47898</guid>
		<description>&lt;p&gt;That&#039;s right Rob.  Strangely, to me, there is no Range property of ActiveWorkbook, which I thought would have also pointed to the ActiveSheet.&lt;/p&gt;
&lt;p&gt;JKP: That&#039;s an interesting difference.  I wonder how that&#039;s coded in Excel.  That is, I wonder if it&#039;s an accidental consequence or if they intended that way.  A few years ago, Tushar convinced me to use WorksheetFunction whenever referring to one.  His argument, if I recall, was that it&#039;s more readable.  And since I have no problem trapping errors with On Error for other things, I shouldn&#039;t have a problem using it here.  That was persuasive to me, so I&#039;ve been spelling it out ever since.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>That&#8217;s right Rob.  Strangely, to me, there is no Range property of ActiveWorkbook, which I thought would have also pointed to the ActiveSheet.</p>
<p>JKP: That&#8217;s an interesting difference.  I wonder how that&#8217;s coded in Excel.  That is, I wonder if it&#8217;s an accidental consequence or if they intended that way.  A few years ago, Tushar convinced me to use WorksheetFunction whenever referring to one.  His argument, if I recall, was that it&#8217;s more readable.  And since I have no problem trapping errors with On Error for other things, I shouldn&#8217;t have a problem using it here.  That was persuasive to me, so I&#8217;ve been spelling it out ever since.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jan Karel Pieterse</title>
		<link>http://www.dailydoseofexcel.com/archives/2010/07/12/properties-and-objects/#comment-47895</link>
		<dc:creator>Jan Karel Pieterse</dc:creator>
		<pubDate>Tue, 13 Jul 2010 12:24:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=4030#comment-47895</guid>
		<description>&lt;p&gt;Application.Transpose is NOT the same as Application.WOrksheetFunction.Transpose.&lt;br&gt;
Take this example:&lt;br&gt;
- Enter 1,2,3 in cellA1 to A3&lt;br&gt;
- Enter =NA() in cell A4&lt;br&gt;
- run this routine:&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; test()&lt;br&gt;
&#160; &#160; &lt;span class=&quot;kw1&quot;&gt;Dim&lt;/span&gt; vResult &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Variant&lt;/span&gt;&lt;br&gt;
&#160; &#160; vResult = Application.Sum(Range(&lt;span class=&quot;st0&quot;&gt;&quot;A1:A4&quot;&lt;/span&gt;).Value)&lt;br&gt;
&#160; &#160; MsgBox TypeName(vResult)&lt;br&gt;
&#160; &#160; vResult = Application.WorksheetFunction.Sum(Range(&lt;span class=&quot;st0&quot;&gt;&quot;A1:A4&quot;&lt;/span&gt;).Value)&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;
&lt;p&gt;Note the difference in how the error is handled&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Application.Transpose is NOT the same as Application.WOrksheetFunction.Transpose.<br />
Take this example:<br />
- Enter 1,2,3 in cellA1 to A3<br />
- Enter =NA() in cell A4<br />
- run this routine:</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> test()<br />
&nbsp; &nbsp; <span class="kw1">Dim</span> vResult <span class="kw1">As</span> <span class="kw1">Variant</span><br />
&nbsp; &nbsp; vResult = Application.Sum(Range(<span class="st0">&#8220;A1:A4&#8243;</span>).Value)<br />
&nbsp; &nbsp; MsgBox TypeName(vResult)<br />
&nbsp; &nbsp; vResult = Application.WorksheetFunction.Sum(Range(<span class="st0">&#8220;A1:A4&#8243;</span>).Value)<br />
<span class="kw1">End</span> <span class="kw1">Sub</span></div>
</div>
<p>Note the difference in how the error is handled</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob van Gelder</title>
		<link>http://www.dailydoseofexcel.com/archives/2010/07/12/properties-and-objects/#comment-47885</link>
		<dc:creator>Rob van Gelder</dc:creator>
		<pubDate>Mon, 12 Jul 2010 21:25:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=4030#comment-47885</guid>
		<description>&lt;p&gt;I never knew there was a Range property of the Application object. I guess it makes sense, since Range(&quot;A1?) = 123 is allowed.&lt;/p&gt;
&lt;p&gt;I did a test, and set up a worksheet specific name in both Sheet1 and Sheet2. eg Sheet1!MyName, and Sheet2!MyName&lt;/p&gt;
&lt;p&gt;Then from vba:&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;?ThisWorkbook.Worksheets(1).Range(&lt;span class=&quot;st0&quot;&gt;&quot;MyName&quot;&lt;/span&gt;)&lt;br&gt;
Sheet1&lt;br&gt;
?ThisWorkbook.Worksheets(2).Range(&lt;span class=&quot;st0&quot;&gt;&quot;MyName&quot;&lt;/span&gt;)&lt;br&gt;
Sheet2&lt;br&gt;
Sheet1.Activate&lt;br&gt;
?Application.Range(&lt;span class=&quot;st0&quot;&gt;&quot;MyName&quot;&lt;/span&gt;)&lt;br&gt;
Sheet1&lt;br&gt;
Sheet2.Activate&lt;br&gt;
?Application.Range(&lt;span class=&quot;st0&quot;&gt;&quot;MyName&quot;&lt;/span&gt;)&lt;br&gt;
Sheet2&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Looks like Application.Range hooks the ActiveSheet range.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I never knew there was a Range property of the Application object. I guess it makes sense, since Range(&#8220;A1?) = 123 is allowed.</p>
<p>I did a test, and set up a worksheet specific name in both Sheet1 and Sheet2. eg Sheet1!MyName, and Sheet2!MyName</p>
<p>Then from vba:</p>
<div style="overflow: auto; white-space: nowrap;" class="codecolorer-container vb default">
<div style="white-space: nowrap;" class="vb codecolorer">?ThisWorkbook.Worksheets(1).Range(<span class="st0">&#8220;MyName&#8221;</span>)<br />
Sheet1<br />
?ThisWorkbook.Worksheets(2).Range(<span class="st0">&#8220;MyName&#8221;</span>)<br />
Sheet2<br />
Sheet1.Activate<br />
?Application.Range(<span class="st0">&#8220;MyName&#8221;</span>)<br />
Sheet1<br />
Sheet2.Activate<br />
?Application.Range(<span class="st0">&#8220;MyName&#8221;</span>)<br />
Sheet2</div>
</div>
<p>Looks like Application.Range hooks the ActiveSheet range.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

