<?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: Custom Enumerations</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2004/07/20/custom-enumerations/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2004/07/20/custom-enumerations/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Tue, 07 Feb 2012 23:32:04 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Eric</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/07/20/custom-enumerations/#comment-32306</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Tue, 13 May 2008 16:43:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=691#comment-32306</guid>
		<description>&lt;p&gt;Is there an easy way to check if a value corresponds to an Enum, such as dkMsgText above?&lt;/p&gt;
&lt;p&gt;Say I had a Long variable: faveNum = 2&lt;/p&gt;
&lt;p&gt;Could I somehow check if faveNum&#039;s current value is valid in dkMsgText? It should be in this case, since it matches dkWorld&#039;s value.&lt;/p&gt;
&lt;p&gt;I&#039;ve tried things like &quot;For Each e in dkWorld&quot;, but it doesn&#039;t let you do that.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Is there an easy way to check if a value corresponds to an Enum, such as dkMsgText above?</p>
<p>Say I had a Long variable: faveNum = 2</p>
<p>Could I somehow check if faveNum&#8217;s current value is valid in dkMsgText? It should be in this case, since it matches dkWorld&#8217;s value.</p>
<p>I&#8217;ve tried things like &#8220;For Each e in dkWorld&#8221;, but it doesn&#8217;t let you do that.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jamie Collins</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/07/20/custom-enumerations/#comment-9263</link>
		<dc:creator>Jamie Collins</dc:creator>
		<pubDate>Wed, 09 Mar 2005 14:57:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=691#comment-9263</guid>
		<description>&lt;p&gt;Here&#039;s a quick re-write:&lt;/p&gt;
&lt;p&gt;Sub SayHello(ByVal eText As dkMsgText)&lt;/p&gt;
&lt;p&gt;Dim sText As String&lt;/p&gt;
&lt;p&gt;If eText And dkHello Then&lt;br&gt;
  sText = &quot;Hello&quot;&lt;br&gt;
End If&lt;/p&gt;
&lt;p&gt;If eText And dkWorld Then&lt;br&gt;
  sText = sText &amp; LTrim$(sText &amp; &quot; World&quot;)&lt;br&gt;
End If&lt;/p&gt;
&lt;p&gt;If eText And dkExclaim Then&lt;br&gt;
  sText = sText &amp; &quot;!&quot;&lt;br&gt;
End If&lt;/p&gt;
&lt;p&gt;MsgBox sText&lt;/p&gt;
&lt;p&gt;End Sub&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Here&#8217;s a quick re-write:</p>
<p>Sub SayHello(ByVal eText As dkMsgText)</p>
<p>Dim sText As String</p>
<p>If eText And dkHello Then<br />
  sText = &#8220;Hello&#8221;<br />
End If</p>
<p>If eText And dkWorld Then<br />
  sText = sText &amp; LTrim$(sText &amp; &#8221; World&#8221;)<br />
End If</p>
<p>If eText And dkExclaim Then<br />
  sText = sText &amp; &#8220;!&#8221;<br />
End If</p>
<p>MsgBox sText</p>
<p>End Sub</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Drenker</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/07/20/custom-enumerations/#comment-9258</link>
		<dc:creator>Steve Drenker</dc:creator>
		<pubDate>Wed, 09 Mar 2005 03:19:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=691#comment-9258</guid>
		<description>&lt;p&gt;Hi, Dick. In your &quot;Custom Enumerations&quot; article on 7/20/04 you said that &quot;Testing the additive nature of the enumeration can be done without testing every possible combination by using bitwise comparisons. But that&#039;s a subject for another post.&quot;&lt;/p&gt;
&lt;p&gt;I&#039;m currently checking every combination with If/ElseIf/End If and Select Case / End Case statements. It&#039;s a pain the keister.&lt;/p&gt;
&lt;p&gt;I&#039;m familiar with using binary series and custom enumerations, but haven&#039;t quite got the hang of setting bits in a number to avoid having to check every comparison.&lt;/p&gt;
&lt;p&gt;Can you shed some light on how to do this? Did you every write that other post you talked about?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Hi, Dick. In your &#8220;Custom Enumerations&#8221; article on 7/20/04 you said that &#8220;Testing the additive nature of the enumeration can be done without testing every possible combination by using bitwise comparisons. But that&#8217;s a subject for another post.&#8221;</p>
<p>I&#8217;m currently checking every combination with If/ElseIf/End If and Select Case / End Case statements. It&#8217;s a pain the keister.</p>
<p>I&#8217;m familiar with using binary series and custom enumerations, but haven&#8217;t quite got the hang of setting bits in a number to avoid having to check every comparison.</p>
<p>Can you shed some light on how to do this? Did you every write that other post you talked about?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dick</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/07/20/custom-enumerations/#comment-2017</link>
		<dc:creator>Dick</dc:creator>
		<pubDate>Fri, 23 Jul 2004 15:08:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=691#comment-2017</guid>
		<description>&lt;p&gt;Jamie:  I&#039;m ashamed to say that it&#039;s pure laziness.  At one point I resolved to always use ByRef and ByVal explicitly so that I could get in the habit or really choosing instead of just accepting the default.  As you can see, that didn&#039;t last.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Jamie:  I&#8217;m ashamed to say that it&#8217;s pure laziness.  At one point I resolved to always use ByRef and ByVal explicitly so that I could get in the habit or really choosing instead of just accepting the default.  As you can see, that didn&#8217;t last.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jamie Collins</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/07/20/custom-enumerations/#comment-2016</link>
		<dc:creator>Jamie Collins</dc:creator>
		<pubDate>Fri, 23 Jul 2004 10:50:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=691#comment-2016</guid>
		<description>&lt;p&gt;&quot;Sub SayHello(eText As dkMsgText)&quot;&lt;/p&gt;
&lt;p&gt;Sorry to be pedantic but it is Friday... Why pass the eText argument by reference?&lt;/p&gt;
&lt;p&gt;Jamie.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>&#8220;Sub SayHello(eText As dkMsgText)&#8221;</p>
<p>Sorry to be pedantic but it is Friday&#8230; Why pass the eText argument by reference?</p>
<p>Jamie.</p>
<p></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ross</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/07/20/custom-enumerations/#comment-2015</link>
		<dc:creator>ross</dc:creator>
		<pubDate>Wed, 21 Jul 2004 11:04:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=691#comment-2015</guid>
		<description>&lt;p&gt;wow, i never knew you could do that! cool&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>wow, i never knew you could do that! cool</p>
]]></content:encoded>
	</item>
</channel>
</rss>

