<?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: IsMissing</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2007/08/06/ismissing/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2007/08/06/ismissing/</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: Stebain</title>
		<link>http://www.dailydoseofexcel.com/archives/2007/08/06/ismissing/#comment-26414</link>
		<dc:creator>Stebain</dc:creator>
		<pubDate>Mon, 13 Aug 2007 23:22:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1709#comment-26414</guid>
		<description>&lt;p&gt;My only real issue with this example is... you don&#039;t provide an example!&lt;/p&gt;
&lt;p&gt;There was enough here to remind me how to use it, but... I had used it plenty before and had just forgotten that it had to be a variant.&lt;/p&gt;
&lt;p&gt;Had I not already known how to use it, I wouldn&#039;t have actually learned how to use the IsMissing.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>My only real issue with this example is&#8230; you don&#8217;t provide an example!</p>
<p>There was enough here to remind me how to use it, but&#8230; I had used it plenty before and had just forgotten that it had to be a variant.</p>
<p>Had I not already known how to use it, I wouldn&#8217;t have actually learned how to use the IsMissing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Zach</title>
		<link>http://www.dailydoseofexcel.com/archives/2007/08/06/ismissing/#comment-26238</link>
		<dc:creator>Zach</dc:creator>
		<pubDate>Tue, 07 Aug 2007 00:54:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1709#comment-26238</guid>
		<description>&lt;p&gt;One good reason to use a variant argument is to allow for flexibility is a general purpose function.  I probably can&#039;t think of many examples of this, but one real world example I do have is a sub that creates and sends a message through Outlook.  The declaration is this:&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; Mailer(MailTo &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;String&lt;/span&gt;, Subject &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;String&lt;/span&gt;, Body &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;String&lt;/span&gt;, &lt;span class=&quot;kw1&quot;&gt;Optional&lt;/span&gt; MailCC &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;String&lt;/span&gt;, &lt;span class=&quot;kw1&quot;&gt;Optional&lt;/span&gt; MailBCC &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;String&lt;/span&gt;, &lt;span class=&quot;kw1&quot;&gt;Optional&lt;/span&gt; Attachments &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Variant&lt;/span&gt;, &lt;span class=&quot;kw1&quot;&gt;Optional&lt;/span&gt; Receipt &lt;span class=&quot;kw1&quot;&gt;As&lt;/span&gt; &lt;span class=&quot;kw1&quot;&gt;Boolean&lt;/span&gt;)&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;I use the variant argument to accept either a string or an array of strings, to allow for flexibility when I drop in this module.&lt;/p&gt;
&lt;p&gt;That said, I totally agree about the strong typing.  I use variants as sparingly as possible, but they do come in handy from time to time.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>One good reason to use a variant argument is to allow for flexibility is a general purpose function.  I probably can&#8217;t think of many examples of this, but one real world example I do have is a sub that creates and sends a message through Outlook.  The declaration is this:</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> Mailer(MailTo <span class="kw1">As</span> <span class="kw1">String</span>, Subject <span class="kw1">As</span> <span class="kw1">String</span>, Body <span class="kw1">As</span> <span class="kw1">String</span>, <span class="kw1">Optional</span> MailCC <span class="kw1">As</span> <span class="kw1">String</span>, <span class="kw1">Optional</span> MailBCC <span class="kw1">As</span> <span class="kw1">String</span>, <span class="kw1">Optional</span> Attachments <span class="kw1">As</span> <span class="kw1">Variant</span>, <span class="kw1">Optional</span> Receipt <span class="kw1">As</span> <span class="kw1">Boolean</span>)</div>
</div>
<p>I use the variant argument to accept either a string or an array of strings, to allow for flexibility when I drop in this module.</p>
<p>That said, I totally agree about the strong typing.  I use variants as sparingly as possible, but they do come in handy from time to time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fzz</title>
		<link>http://www.dailydoseofexcel.com/archives/2007/08/06/ismissing/#comment-26230</link>
		<dc:creator>fzz</dc:creator>
		<pubDate>Mon, 06 Aug 2007 19:06:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1709#comment-26230</guid>
		<description>&lt;p&gt;This time with VB tags.&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;If&lt;/span&gt; IsMissing(OptionalString) &lt;span class=&quot;kw1&quot;&gt;Then&lt;/span&gt;&lt;br&gt;
&#160; OptionalString = &lt;span class=&quot;st0&quot;&gt;&quot;&quot;&lt;/span&gt;&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;ElseIf&lt;/span&gt; VarType(OptionalString &lt;&gt; 8) &lt;span class=&quot;kw1&quot;&gt;Then&lt;/span&gt;&lt;br&gt;
&#160; Err.Raise . . .&lt;br&gt;
&lt;span class=&quot;kw1&quot;&gt;Else&lt;/span&gt;&lt;br&gt;
&#160; &lt;span class=&quot;co1&quot;&gt;&#039;it&#039;s a string - nothing more to do&lt;br&gt;
&lt;/span&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;
</description>
		<content:encoded><![CDATA[<p>This time with VB tags.</p>
<div style="overflow: auto; white-space: nowrap;" class="codecolorer-container vb default">
<div style="white-space: nowrap;" class="vb codecolorer"><span class="kw1">If</span> IsMissing(OptionalString) <span class="kw1">Then</span><br />
&nbsp; OptionalString = <span class="st0">&#8220;&#8221;</span><br />
<span class="kw1">ElseIf</span> VarType(OptionalString &amp;lt;&amp;gt; <img src='http://www.dailydoseofexcel.com/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> <span class="kw1">Then</span><br />
&nbsp; Err.Raise . . .<br />
<span class="kw1">Else</span><br />
&nbsp; <span class="co1">&#8216;it&#8217;s a string &#8211; nothing more to do<br />
</span><span class="kw1">End</span> <span class="kw1">If</span></div>
</div>
]]></content:encoded>
	</item>
	<item>
		<title>By: fzz</title>
		<link>http://www.dailydoseofexcel.com/archives/2007/08/06/ismissing/#comment-26229</link>
		<dc:creator>fzz</dc:creator>
		<pubDate>Mon, 06 Aug 2007 19:04:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1709#comment-26229</guid>
		<description>&lt;p&gt;I don&#039;t see the claimed problem. There is a potential problem: variants take more memory and slow down processing since it takes extra cycles to determine what type they currently contain.&lt;/p&gt;
&lt;p&gt;However, strong typing is not a problem (provided you could live with runtime instead of compiletime errors). It COULD be handled in code, just like checking whether the optional variable is missing or not.&lt;/p&gt;
&lt;p&gt;If IsMissing(OptionalString) Then&lt;br&gt;
  OptionalString = &quot;&quot;&lt;br&gt;
ElseIf VarType(OptionalString &lt;&gt; 8) Then&lt;br&gt;
  Err.Raise . . .&lt;br&gt;
Else&lt;br&gt;
  &#039;it&#039;s a string - nothing more to do&lt;br&gt;
End If&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I don&#8217;t see the claimed problem. There is a potential problem: variants take more memory and slow down processing since it takes extra cycles to determine what type they currently contain.</p>
<p>However, strong typing is not a problem (provided you could live with runtime instead of compiletime errors). It COULD be handled in code, just like checking whether the optional variable is missing or not.</p>
<p>If IsMissing(OptionalString) Then<br />
  OptionalString = &#8220;&#8221;<br />
ElseIf VarType(OptionalString &lt;&gt; <img src='http://www.dailydoseofexcel.com/wp-includes/images/smilies/icon_cool.gif' alt='8)' class='wp-smiley' /> Then<br />
  Err.Raise . . .<br />
Else<br />
  &#8216;it&#8217;s a string &#8211; nothing more to do<br />
End If</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex J</title>
		<link>http://www.dailydoseofexcel.com/archives/2007/08/06/ismissing/#comment-26226</link>
		<dc:creator>Alex J</dc:creator>
		<pubDate>Mon, 06 Aug 2007 14:02:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=1709#comment-26226</guid>
		<description>&lt;p&gt;I use the same technique as Tony (specified default)all the time, especially for functions called from VBA.&lt;/p&gt;
&lt;p&gt;It also keeps the code more concise - I don;t have to verify ISMISSING to determine how to use the passed variable. Also useful when multiple optional values are passed.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I use the same technique as Tony (specified default)all the time, especially for functions called from VBA.</p>
<p>It also keeps the code more concise &#8211; I don;t have to verify ISMISSING to determine how to use the passed variable. Also useful when multiple optional values are passed.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

