<?xml version="1.0" encoding="iso-8859-1"?>


<rss version="2.0">
	<channel>
		<atom:link xmlns:atom="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://oorang.webs.com/apps/blog/"/>
		<title><![CDATA[Land Of Oorang]]></title>
		<description>Hello,This is where I throw out code tidbits, minutia, bad artwork, obscure jokes and various other things that no one will care about but me.Welcome.&#160;</description>
		<link>http://oorang.webs.com/apps/blog/</link>
		<generator>Webs.com</generator>

			<item>
				<title>New Entry in Code Archive</title>
				<author><name>Oorang</name></author>
				<link>http://oorang.webs.com/apps/blog/show/3322693</link>
				<description>&lt;p&gt;&amp;#160;&lt;/p&gt;&lt;p&gt;&amp;#160;&amp;#160;&amp;#160; I have added an entry in the codearchive. It is a program to sort an array of strings. It is tweaked to run asfast as possible on VBA, while still offering few commonly needed features. Itwill allow for sorting ascending/descending and a choice to compare casesensitive or case insensitively. Take a look a let me know if there is room forimprovement.&lt;/p&gt;</description>
				<pubDate>Fri, 02 Apr 2010 01:28:00 +0000</pubDate>
				<guid>http://oorang.webs.com/apps/blog/show/3322693</guid>
			</item>
			<item>
				<title>Funny and Disturbing</title>
				<author><name>Oorang</name></author>
				<link>http://oorang.webs.com/apps/blog/show/2649910</link>
				<description>&lt;p&gt;OK, maybe it's just me, but when this recommendation from ITunes Genius popped up, I was both amused and disturbed. &lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;img src="http://oorang.webs.com//Images/HilariousITunesRec.PNG"/&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;Yes this really happened. &lt;br/&gt;&lt;/p&gt;</description>
				<pubDate>Fri, 22 Jan 2010 04:52:00 +0000</pubDate>
				<guid>http://oorang.webs.com/apps/blog/show/2649910</guid>
			</item>
			<item>
				<title>How to Output all Project References Using the Immediate Window</title>
				<author><name>Oorang</name></author>
				<link>http://oorang.webs.com/apps/blog/show/2197216</link>
				<description>&lt;p&gt;It's often useful to document, either in a module or in a post, the referencs needed to make the module (or code snippet work). Unfortunately you can't copy the path's and names from the references window. Here is a nice and easy way to get the information you need. &lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Press Ctrl-G to open the Immediate Window.&lt;/li&gt;&lt;li&gt;Paste this:&amp;#160;&lt;br/&gt;&lt;code&gt;For Each r in Application.VBE.ActiveVBProject.References:?"'"&amp;amp;r.Name,r.FullPath:Next&lt;/code&gt;&lt;/li&gt;&lt;li&gt;Press Enter, and enjoy:)&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Some people (me) like this format better, it's a little longer though:&lt;br/&gt;&lt;code&gt;For Each r in Application.VBE.ActiveVBProject.References:?"'"&amp;amp; vbTab+"-"&amp;amp;r.Description:?"'"&amp;amp;vbTab+" "&amp;amp;r.FullPath:Next&lt;/code&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&amp;#160;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description>
				<pubDate>Wed, 25 Nov 2009 19:50:00 +0000</pubDate>
				<guid>http://oorang.webs.com/apps/blog/show/2197216</guid>
			</item>
			<item>
				<title>Microsoft Office 2010 Beta Released</title>
				<author><name>Oorang</name></author>
				<link>http://oorang.webs.com/apps/blog/show/2164609</link>
				<description>&lt;p&gt;In case you missed it. http://www.microsoft.com/office/2010/en/default.aspx&lt;br/&gt;&lt;/p&gt;</description>
				<pubDate>Sat, 21 Nov 2009 04:23:00 +0000</pubDate>
				<guid>http://oorang.webs.com/apps/blog/show/2164609</guid>
			</item>
			<item>
				<title>Thought of the Day</title>
				<author><name>Oorang</name></author>
				<link>http://oorang.webs.com/apps/blog/show/2092144</link>
				<description>&lt;p&gt;You should always speak the truth. But you shouldn't always speak. &lt;/p&gt;</description>
				<pubDate>Mon, 09 Nov 2009 08:04:00 +0000</pubDate>
				<guid>http://oorang.webs.com/apps/blog/show/2092144</guid>
			</item>
			<item>
				<title>Using Excel Checkboxes as Option Groups</title>
				<author><name>Oorang</name></author>
				<link>http://oorang.webs.com/apps/blog/show/2082070</link>
				<description>&lt;p&gt;Every now and again I will run across a post like this: &lt;/p&gt;&lt;blockquote&gt;&lt;i&gt;I have created &lt;/i&gt;(a)&lt;i&gt; form with check boxes. I am trying program the form so that when a particular box is checked the user cannot check another box in that row. For example, the user should not be able to check "yes", "no" and/or "don't know" at the same time. This is the code I an using, but I keep recieving error messages. What is the problem?&lt;/i&gt;&lt;/blockquote&gt;&lt;p&gt;Often such posts are followed by solutions that involve catching the click event of &lt;i&gt;every single&lt;/i&gt; CheckBox control, then manually checking each CheckBox that shouldn't be selected and flipping the value:&amp;#160;&lt;/p&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;code&gt;&lt;br/&gt;Private Sub CheckBox1_Click()&lt;br/&gt;    If Me.CheckBox1.Value Then&lt;br/&gt;        If Me.CheckBox2.Value Then Me.CheckBox2.Value = False&lt;br/&gt;        If Me.CheckBox3.Value Then Me.CheckBox3.Value = False&lt;br/&gt;    End If&lt;br/&gt;End Sub&lt;br/&gt;&lt;br/&gt;Private Sub CheckBox2_Click()&lt;br/&gt;    If Me.CheckBox2.Value Then&lt;br/&gt;        If Me.CheckBox1.Value Then Me.CheckBox1.Value = False&lt;br/&gt;        If Me.CheckBox3.Value Then Me.CheckBox3.Value = False&lt;br/&gt;    End If&lt;br/&gt;End Sub&lt;br/&gt;&lt;br/&gt;Private Sub CheckBox3_Click()&lt;br/&gt;    If Me.CheckBox3.Value Then&lt;br/&gt;        If Me.CheckBox1.Value Then Me.CheckBox1.Value = False&lt;br/&gt;        If Me.CheckBox2.Value Then Me.CheckBox2.Value = False&lt;br/&gt;    End If&lt;br/&gt;End Sub&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;p&gt;&amp;#160;&amp;#160;&amp;#160; If this code made you cringe, you are not alone. As you can imagine, when you (or the poor soul following you) has to add/rename/delete a CheckBox in future this is going to be real maintenance nightmare. Especially if you, like the user above have a lot of controls. Fortunately there is an easy solution to this problem. &lt;/p&gt;&lt;p&gt;&amp;#160;&lt;/p&gt;&lt;p&gt;&amp;#160;&amp;#160;&amp;#160; The easiest solution is, of course, to just use Option Groups. No code needed. But some people just really hate radio buttons and want the look of a CheckBox. And since some of those people might be employing you, I will direct your attention to the &lt;u&gt;GroupName&lt;/u&gt; property of the CheckBox control. At first glance you might think all your problems are solved. It looks just like the OptionButton.GroupName property! Yay! Sadly, for whatever reason, in VBA this property will hold a value, but the mutual exclusion of an Option Button Group is just not implemented automatically. But don't despair! It's still pretty easy to work around this. With a Class Based approach you can reduce the code in your Form to this:&lt;/p&gt;&lt;blockquote&gt;&lt;pre&gt;&lt;code&gt;&lt;br/&gt;Private m_cogGroup1 As New CheckOptionGroup&lt;br/&gt;Private m_cogGroup2 As New CheckOptionGroup&lt;br/&gt;&lt;br/&gt;Private Sub UserForm_Initialize()&lt;br/&gt;    m_cogGroup1.InitializeGroup "Group1", Me.Controls&lt;br/&gt;    m_cogGroup2.InitializeGroup "Group2", Me.Controls&lt;br/&gt;End Sub&lt;br/&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/blockquote&gt;&lt;p&gt;&amp;#160;&lt;/p&gt;&lt;p&gt;&lt;b&gt;To do this:&lt;/b&gt; &lt;/p&gt;&lt;ol&gt;&lt;li&gt;Import the two classes posted below.&lt;/li&gt;&lt;li&gt;Go ahead and use the GroupName property to specify your groups of checkboxes (just like you would an option group). &lt;/li&gt;&lt;li&gt;Implement as shown above, using one array of CheckOptionGroup for each group.&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;To make life a little easier, I have created an &lt;a href="http://oorang.webs.com/CodeArchiveFiles/CheckOptionGroup/Example.xls"&gt;Example Workbook&lt;/a&gt;.&lt;/p&gt;&lt;p&gt;&amp;#160;&lt;/p&gt;&lt;p&gt;If you just want to copy/paste the code use these:&lt;/p&gt;&lt;p&gt;&lt;a href="http://oorang.webs.com/CodeArchiveFiles/CheckOptionGroup/CheckOption.cls"&gt;CheckOption.cls&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="http://oorang.webs.com/CodeArchiveFiles/CheckOptionGroup/CheckOptionGroup.cls"&gt;CheckOptionGroup.cls&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&amp;#160;&lt;/p&gt;&lt;p&gt;These are also stored in the &lt;a href="http://oorang.webs.com/codearchive.htm#CheckBoxOptions"&gt;Code Archive&lt;/a&gt;.&lt;/p&gt;</description>
				<pubDate>Sat, 07 Nov 2009 20:10:00 +0000</pubDate>
				<guid>http://oorang.webs.com/apps/blog/show/2082070</guid>
			</item>
			<item>
				<title>All Caps</title>
				<author><name>Oorang</name></author>
				<link>http://oorang.webs.com/apps/blog/show/1576113</link>
				<description>&lt;p&gt;Something I've just noticed recently: Advice given in all caps is almost always wrong.&lt;br/&gt;&lt;/p&gt;</description>
				<pubDate>Sun, 16 Aug 2009 04:44:00 +0000</pubDate>
				<guid>http://oorang.webs.com/apps/blog/show/1576113</guid>
			</item>
			<item>
				<title>I can Haz StackOverflow?</title>
				<author><name>Oorang</name></author>
				<link>http://oorang.webs.com/apps/blog/show/1272080</link>
				<description>&lt;p&gt;I have been &lt;a href="http://stackoverflow.com/users/102270/oorang"&gt;participating&lt;/a&gt; in the development question and answer site &lt;a href="http://stackoverflow.com"&gt;StackOverflow&lt;/a&gt;. If you haven't been there yet, you really should take a look. StackOverflow is a great place to get an answer. One of the reasons it &lt;i&gt;is&lt;/i&gt; such a great place to get an answer is that it's pretty no-nonsense. Any response to a question that is not a correct answer will be voted down, and on some occasions submitted to some less than tactful critique. This is not a bad thing, because it contributes to an enviroment that encourages correct answers. But it is also why &lt;b&gt;&lt;a href="http://stackoverflow.com/questions/23930/factorial-algorithms-in-different-languages/23989#23989"&gt;the correct answer&lt;/a&gt;&lt;/b&gt; to &lt;a href="http://stackoverflow.com/questions/23930/factorial-algorithms-in-different-languages/23989"&gt;this question&lt;/a&gt; had me laughing so hard.&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;&lt;br/&gt;&lt;/p&gt;</description>
				<pubDate>Sun, 28 Jun 2009 13:45:00 +0000</pubDate>
				<guid>http://oorang.webs.com/apps/blog/show/1272080</guid>
			</item>
			<item>
				<title>A Simple Way to Get a GUID</title>
				<author><name>Oorang</name></author>
				<link>http://oorang.webs.com/apps/blog/show/1271539</link>
				<description>&lt;p&gt;I have seen a lot of different ways to get a GUID, from randomly generating each character to using API calls. And every time I do, I think "Gosh that didn't have to be so hard." So for the record... Here is the easy way:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Private Function GetGUID() As String&lt;br/&gt;    GetGUID = Mid$(CreateObject("Scriptlet.TypeLib").GUID, 2, 36)&lt;br/&gt;End Function&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Of course if you only need one, you could just go &lt;a href="http://createguid.com/"&gt;here&lt;/a&gt;.&lt;/p&gt;</description>
				<pubDate>Sun, 28 Jun 2009 11:41:00 +0000</pubDate>
				<guid>http://oorang.webs.com/apps/blog/show/1271539</guid>
			</item>
			<item>
				<title>The Strangest Thing I Have Seen Today</title>
				<author><name>Oorang</name></author>
				<link>http://oorang.webs.com/apps/blog/show/1171884</link>
				<description>&lt;p&gt;Thanks to &lt;a href="http://stackoverflow.com/users/28991/braveterry"&gt;BraveTerry&lt;/a&gt; for pointing this out: &lt;a href="http://www.amazon.com/reader/1593271905/192-1874267-9787839?_encoding=UTF8&amp;amp;ref_=sib_dp_pop_toc&amp;amp;page=7#reader"&gt;The Manga Guide to Databases.&lt;/a&gt;&lt;br/&gt;&lt;/p&gt;&lt;p&gt;I'm not a manga fan, but that is just... just... well words fail me:)&lt;/p&gt;</description>
				<pubDate>Thu, 11 Jun 2009 20:15:00 +0000</pubDate>
				<guid>http://oorang.webs.com/apps/blog/show/1171884</guid>
			</item>
	</channel>
</rss>


