<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Excel 2010 Application.Caller Bug</title>
	<atom:link href="http://blog.gobansaor.com/2010/02/11/excel-2010-application-caller-bug/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.gobansaor.com/2010/02/11/excel-2010-application-caller-bug/</link>
	<description>A country datasmith.</description>
	<lastBuildDate>Fri, 10 Feb 2012 11:24:31 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Tom Gleeson</title>
		<link>http://blog.gobansaor.com/2010/02/11/excel-2010-application-caller-bug/#comment-5806</link>
		<dc:creator><![CDATA[Tom Gleeson]]></dc:creator>
		<pubDate>Fri, 19 Mar 2010 23:06:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gobansaor.com/?p=851#comment-5806</guid>
		<description><![CDATA[Danny Khen from Microsoft has emailed me to say ...

&quot;This is a known Beta bug which has since been fixed. So you should expect it to go away when Office 2010 ships&quot;

Good news.

Tom]]></description>
		<content:encoded><![CDATA[<p>Danny Khen from Microsoft has emailed me to say &#8230;</p>
<p>&#8220;This is a known Beta bug which has since been fixed. So you should expect it to go away when Office 2010 ships&#8221;</p>
<p>Good news.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Beyers</title>
		<link>http://blog.gobansaor.com/2010/02/11/excel-2010-application-caller-bug/#comment-5803</link>
		<dc:creator><![CDATA[John Beyers]]></dc:creator>
		<pubDate>Thu, 18 Mar 2010 23:25:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gobansaor.com/?p=851#comment-5803</guid>
		<description><![CDATA[Thank you.
I can confirm that Application.ThisCell.Formula returns the correct formula when Application.Caller does not.]]></description>
		<content:encoded><![CDATA[<p>Thank you.<br />
I can confirm that Application.ThisCell.Formula returns the correct formula when Application.Caller does not.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Gleeson</title>
		<link>http://blog.gobansaor.com/2010/02/11/excel-2010-application-caller-bug/#comment-5800</link>
		<dc:creator><![CDATA[Tom Gleeson]]></dc:creator>
		<pubDate>Thu, 18 Mar 2010 20:58:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gobansaor.com/?p=851#comment-5800</guid>
		<description><![CDATA[I learned my Excel Object Model on &#039;97 &amp; 2000 so I&#039;d missed ThisCell (note to oneself; maybe a revisit of the model would be a good idea). 

This warning on ThisCell as regards array formulae is from http://www.cpearson.com/excel/ReturningArraysFromVBA.aspx

&quot;CAUTION: In Excel 2003, a new object, Application.ThisCell, was introduced. It is similar in nature to Application.Caller, but differs when a UDF is array entered into a range of more than one cell. Application.Caller will return the a Range reference to the entire range in which the UDF was array-entered. Application.ThisCell returns a reference to the first (upper left) cell in the range from which the UDF was called. Frankly, I&#039;m not sure why Application.ThisCell was introduced in the first place.&quot;]]></description>
		<content:encoded><![CDATA[<p>I learned my Excel Object Model on &#8217;97 &amp; 2000 so I&#8217;d missed ThisCell (note to oneself; maybe a revisit of the model would be a good idea). </p>
<p>This warning on ThisCell as regards array formulae is from <a href="http://www.cpearson.com/excel/ReturningArraysFromVBA.aspx" rel="nofollow">http://www.cpearson.com/excel/ReturningArraysFromVBA.aspx</a></p>
<p>&#8220;CAUTION: In Excel 2003, a new object, Application.ThisCell, was introduced. It is similar in nature to Application.Caller, but differs when a UDF is array entered into a range of more than one cell. Application.Caller will return the a Range reference to the entire range in which the UDF was array-entered. Application.ThisCell returns a reference to the first (upper left) cell in the range from which the UDF was called. Frankly, I&#8217;m not sure why Application.ThisCell was introduced in the first place.&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Gleeson</title>
		<link>http://blog.gobansaor.com/2010/02/11/excel-2010-application-caller-bug/#comment-5799</link>
		<dc:creator><![CDATA[Tom Gleeson]]></dc:creator>
		<pubDate>Thu, 18 Mar 2010 20:52:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gobansaor.com/?p=851#comment-5799</guid>
		<description><![CDATA[You could use Application.Version  to determine which range object to work on, .Caller for &lt; 14.0 and .ThisCell for 14.0 (Excel 2010)

Tom]]></description>
		<content:encoded><![CDATA[<p>You could use Application.Version  to determine which range object to work on, .Caller for &lt; 14.0 and .ThisCell for 14.0 (Excel 2010)</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Hoadley</title>
		<link>http://blog.gobansaor.com/2010/02/11/excel-2010-application-caller-bug/#comment-5798</link>
		<dc:creator><![CDATA[Peter Hoadley]]></dc:creator>
		<pubDate>Thu, 18 Mar 2010 20:17:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gobansaor.com/?p=851#comment-5798</guid>
		<description><![CDATA[Tom -- I agree with you that application.caller may have other issues if address is wrong.  If it&#039;s not fixed in the final release I think it would be best to avoid it completely.

ie Basically, if you are only interested in one cell, you can simply use application.ThisCell in place of application.caller as they both do the same thing (when the range is just one cell).  So application.caller can be avoided entirely.

The only issue to watch out for is that application.ThisCell was introduced in Excel 2003.  So if you require your software to work on Excel 2002 (which I do) you would need to test for that.

Peter]]></description>
		<content:encoded><![CDATA[<p>Tom &#8212; I agree with you that application.caller may have other issues if address is wrong.  If it&#8217;s not fixed in the final release I think it would be best to avoid it completely.</p>
<p>ie Basically, if you are only interested in one cell, you can simply use application.ThisCell in place of application.caller as they both do the same thing (when the range is just one cell).  So application.caller can be avoided entirely.</p>
<p>The only issue to watch out for is that application.ThisCell was introduced in Excel 2003.  So if you require your software to work on Excel 2002 (which I do) you would need to test for that.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Gleeson</title>
		<link>http://blog.gobansaor.com/2010/02/11/excel-2010-application-caller-bug/#comment-5797</link>
		<dc:creator><![CDATA[Tom Gleeson]]></dc:creator>
		<pubDate>Thu, 18 Mar 2010 19:32:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gobansaor.com/?p=851#comment-5797</guid>
		<description><![CDATA[Looks like a few others have noticed the bug http://social.technet.microsoft.com/Forums/en/excel/thread/dc50fdee-3e7a-4fc3-af04-eb8f56472da9

The way to get this fixed is to post to forums or leave comments on blogs (like this one) or Twitter it or write a blog post.  The more noise, the more likely MS will notice it.

Also if you know any official beta testers ask them to report it.

Tom]]></description>
		<content:encoded><![CDATA[<p>Looks like a few others have noticed the bug <a href="http://social.technet.microsoft.com/Forums/en/excel/thread/dc50fdee-3e7a-4fc3-af04-eb8f56472da9" rel="nofollow">http://social.technet.microsoft.com/Forums/en/excel/thread/dc50fdee-3e7a-4fc3-af04-eb8f56472da9</a></p>
<p>The way to get this fixed is to post to forums or leave comments on blogs (like this one) or Twitter it or write a blog post.  The more noise, the more likely MS will notice it.</p>
<p>Also if you know any official beta testers ask them to report it.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Gleeson</title>
		<link>http://blog.gobansaor.com/2010/02/11/excel-2010-application-caller-bug/#comment-5796</link>
		<dc:creator><![CDATA[Tom Gleeson]]></dc:creator>
		<pubDate>Thu, 18 Mar 2010 16:06:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gobansaor.com/?p=851#comment-5796</guid>
		<description><![CDATA[@Peter

As ThisCell also has a .Parent property then by setting ...

sSheet = application.ThisCell.Parent.name

... this should work even when .Caller is pointing at another sheet.

Might also be a good idea to go up another level (.Parent.Parent) to get the workbook just to be sure, to be sure (to use an Irishism ;-) )


Thanks Peter for that.

Tom]]></description>
		<content:encoded><![CDATA[<p>@Peter</p>
<p>As ThisCell also has a .Parent property then by setting &#8230;</p>
<p>sSheet = application.ThisCell.Parent.name</p>
<p>&#8230; this should work even when .Caller is pointing at another sheet.</p>
<p>Might also be a good idea to go up another level (.Parent.Parent) to get the workbook just to be sure, to be sure (to use an Irishism <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  )</p>
<p>Thanks Peter for that.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Gleeson</title>
		<link>http://blog.gobansaor.com/2010/02/11/excel-2010-application-caller-bug/#comment-5794</link>
		<dc:creator><![CDATA[Tom Gleeson]]></dc:creator>
		<pubDate>Thu, 18 Mar 2010 14:31:12 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gobansaor.com/?p=851#comment-5794</guid>
		<description><![CDATA[@Peter

That could be a solution, the only problem may be the 
sSheet = application.caller.Parent.name bit, while most of the time the application.caller range is pointing towards the &quot;wrong&quot; cell in the &quot;right&quot; sheet, I think I&#039;ve also seen it pointing towards both the &quot;wrong&quot; cell and &quot;wrong&quot; sheet, but I might be wrong in that. I&#039;ll make a similar change to my code and try it out.

Tom]]></description>
		<content:encoded><![CDATA[<p>@Peter</p>
<p>That could be a solution, the only problem may be the<br />
sSheet = application.caller.Parent.name bit, while most of the time the application.caller range is pointing towards the &#8220;wrong&#8221; cell in the &#8220;right&#8221; sheet, I think I&#8217;ve also seen it pointing towards both the &#8220;wrong&#8221; cell and &#8220;wrong&#8221; sheet, but I might be wrong in that. I&#8217;ll make a similar change to my code and try it out.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Hoadley</title>
		<link>http://blog.gobansaor.com/2010/02/11/excel-2010-application-caller-bug/#comment-5791</link>
		<dc:creator><![CDATA[Peter Hoadley]]></dc:creator>
		<pubDate>Thu, 18 Mar 2010 12:16:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gobansaor.com/?p=851#comment-5791</guid>
		<description><![CDATA[Sorry, rCaller above should be application.caller 
Peter]]></description>
		<content:encoded><![CDATA[<p>Sorry, rCaller above should be application.caller<br />
Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Hoadley</title>
		<link>http://blog.gobansaor.com/2010/02/11/excel-2010-application-caller-bug/#comment-5790</link>
		<dc:creator><![CDATA[Peter Hoadley]]></dc:creator>
		<pubDate>Thu, 18 Mar 2010 12:14:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.gobansaor.com/?p=851#comment-5790</guid>
		<description><![CDATA[Tom,

I have developed a work around which will be my fall back if the bug isn&#039;t fixed in the release. The solution works in all versions of Excel.

You can get the address of the UDF using Application.ThisCell.Address  This is a string (not a range object).

To get a range object you can then use code similar to the following:

sThisCell = Application.ThisCell.Address  
sSheet = rCaller.Parent.name   
Set rRangeObject = Sheets(sSheet).Range(sThisCell )

rRangeObject (which is defined as type range) now is exactly the same as 

Set rRangeObject  = application.caller, except that it is now correct in Excel 2010.

I&#039;ve tested this and it&#039;s working correctly.

Peter]]></description>
		<content:encoded><![CDATA[<p>Tom,</p>
<p>I have developed a work around which will be my fall back if the bug isn&#8217;t fixed in the release. The solution works in all versions of Excel.</p>
<p>You can get the address of the UDF using Application.ThisCell.Address  This is a string (not a range object).</p>
<p>To get a range object you can then use code similar to the following:</p>
<p>sThisCell = Application.ThisCell.Address<br />
sSheet = rCaller.Parent.name<br />
Set rRangeObject = Sheets(sSheet).Range(sThisCell )</p>
<p>rRangeObject (which is defined as type range) now is exactly the same as </p>
<p>Set rRangeObject  = application.caller, except that it is now correct in Excel 2010.</p>
<p>I&#8217;ve tested this and it&#8217;s working correctly.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
</channel>
</rss>

