<?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: Classes: Creating Custom Objects</title>
	<atom:link href="http://www.dailydoseofexcel.com/archives/2004/09/28/classes-creating-custom-objects/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dailydoseofexcel.com/archives/2004/09/28/classes-creating-custom-objects/</link>
	<description>Daily posts of Excel tips…and other stuff</description>
	<lastBuildDate>Wed, 08 Feb 2012 23:58:05 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Dick Kusleika</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/09/28/classes-creating-custom-objects/#comment-32158</link>
		<dc:creator>Dick Kusleika</dc:creator>
		<pubDate>Sun, 04 May 2008 03:31:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=783#comment-32158</guid>
		<description>&lt;p&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/aa164936&quot; rel=&quot;nofollow&quot;&gt;http://msdn.microsoft.com/en-us/library/aa164936&lt;/a&gt;(office.10).aspx&lt;/p&gt;
&lt;p&gt;Maybe there?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p><a href="http://msdn.microsoft.com/en-us/library/aa164936" rel="nofollow">http://msdn.microsoft.com/en-us/library/aa164936</a>(office.10).aspx</p>
<p>Maybe there?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Randy</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/09/28/classes-creating-custom-objects/#comment-32125</link>
		<dc:creator>Randy</dc:creator>
		<pubDate>Wed, 30 Apr 2008 20:16:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=783#comment-32125</guid>
		<description>&lt;p&gt;davidd31415: I tried to go to that MSDN site and it was no longer there.  Any ideas where to find it?&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>davidd31415: I tried to go to that MSDN site and it was no longer there.  Any ideas where to find it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: davidd31415</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/09/28/classes-creating-custom-objects/#comment-17530</link>
		<dc:creator>davidd31415</dc:creator>
		<pubDate>Mon, 21 Nov 2005 02:25:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=783#comment-17530</guid>
		<description>&lt;p&gt;For anyone who would like a bit more information on exactly how to declare/instantiate classes, spend a few minutes reading through the class-related articles here: &lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/modcore/html/deovrCustomClassesObjects.asp&quot; rel=&quot;nofollow&quot;&gt;http://msdn.microsoft.com/library/default.asp?url=/library/en-us/modcore/html/deovrCustomClassesObjects.asp&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I found them very easy to read and although MSDN often leaves me scratching my head, in this case everything was clear.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>For anyone who would like a bit more information on exactly how to declare/instantiate classes, spend a few minutes reading through the class-related articles here: </p>
<p><a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/modcore/html/deovrCustomClassesObjects.asp" rel="nofollow">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/modcore/html/deovrCustomClassesObjects.asp</a></p>
<p>I found them very easy to read and although MSDN often leaves me scratching my head, in this case everything was clear.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Davidd31415</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/09/28/classes-creating-custom-objects/#comment-17496</link>
		<dc:creator>Davidd31415</dc:creator>
		<pubDate>Wed, 16 Nov 2005 03:52:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=783#comment-17496</guid>
		<description>&lt;p&gt;I think this page does a decent job explaining the fundamentals of objects &amp; classes (I am just now learning the power of them after using VBA and Delphi for a few years).  HOWEVER, most of my object-oriented learning has been coming from C++ and I have found few resources on the web discussing object-oriented programming in VBA; not to say that there are few resources, but the number of people selling VBA books and the number of websites focusing on simple VBA concepts has made it difficut to find what I am looking for! &lt;/p&gt;
&lt;p&gt;I took the time to write all that because, although the example above shows how to access properties, it does not show how to make a class in the first place!  The statement &quot;The name of the class is Card and it has three properties,&quot; is made, yet the Card class itself is never declared!&lt;/p&gt;
&lt;p&gt;I&#039;m sure I&#039;ll find the line or two of code I need to complete this, but it always erks me when someone writes a code example but does not include the entire piece of code.  There are situations where such a practice is understandable, but I don&#039;t think this is one of them. &lt;/p&gt;
&lt;p&gt;After all that complaining I must say I&#039;m glad this site is here; just trying to help make it better!  Like I said before, I&#039;ve had a hard time finding pages even similar to this!&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>I think this page does a decent job explaining the fundamentals of objects &amp; classes (I am just now learning the power of them after using VBA and Delphi for a few years).  HOWEVER, most of my object-oriented learning has been coming from C++ and I have found few resources on the web discussing object-oriented programming in VBA; not to say that there are few resources, but the number of people selling VBA books and the number of websites focusing on simple VBA concepts has made it difficut to find what I am looking for! </p>
<p>I took the time to write all that because, although the example above shows how to access properties, it does not show how to make a class in the first place!  The statement &#8220;The name of the class is Card and it has three properties,&#8221; is made, yet the Card class itself is never declared!</p>
<p>I&#8217;m sure I&#8217;ll find the line or two of code I need to complete this, but it always erks me when someone writes a code example but does not include the entire piece of code.  There are situations where such a practice is understandable, but I don&#8217;t think this is one of them. </p>
<p>After all that complaining I must say I&#8217;m glad this site is here; just trying to help make it better!  Like I said before, I&#8217;ve had a hard time finding pages even similar to this!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jamie Collins</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/09/28/classes-creating-custom-objects/#comment-2362</link>
		<dc:creator>Jamie Collins</dc:creator>
		<pubDate>Mon, 04 Oct 2004 09:39:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=783#comment-2362</guid>
		<description>&lt;p&gt;For the last Excel application I solely wrote from scratch, out of approx 4K lines of code, only one method (21 lines) is in a standard module and then only because it has to be a public sub in a standard module so it can be triggered by a hyperlink. I guess I could&#039;ve rolled my own hyperlink class triggered from an ActiveX control but it was a last minute requirement ;-) So, yeah, I&#039;m heavily into &#039;abstract&#039; classes now.&lt;/p&gt;
&lt;p&gt;Interestingly, when I was first leaning this stuff, I cut my teeth by implementing a card game called Chrononauts (http://www.boardgamegeek.com/game/815). It never made it to the GUI stage (I would&#039;ve needed Looney Labs&#039; permission for that - oops!) but I made lots of discoveries just writing the object model i.e. the classes and collection classes with their properties, methods and events. I also discovered that inheritance would&#039;ve com in handy for the Card base object :-(&lt;/p&gt;
&lt;p&gt;Jamie.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>For the last Excel application I solely wrote from scratch, out of approx 4K lines of code, only one method (21 lines) is in a standard module and then only because it has to be a public sub in a standard module so it can be triggered by a hyperlink. I guess I could&#8217;ve rolled my own hyperlink class triggered from an ActiveX control but it was a last minute requirement <img src='http://www.dailydoseofexcel.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  So, yeah, I&#8217;m heavily into &#8216;abstract&#8217; classes now.</p>
<p>Interestingly, when I was first leaning this stuff, I cut my teeth by implementing a card game called Chrononauts (<a href="http://www.boardgamegeek.com/game/815" rel="nofollow">http://www.boardgamegeek.com/game/815</a>). It never made it to the GUI stage (I would&#8217;ve needed Looney Labs&#8217; permission for that &#8211; oops!) but I made lots of discoveries just writing the object model i.e. the classes and collection classes with their properties, methods and events. I also discovered that inheritance would&#8217;ve com in handy for the Card base object <img src='http://www.dailydoseofexcel.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p>Jamie.</p>
<p></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul's Blog</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/09/28/classes-creating-custom-objects/#comment-2363</link>
		<dc:creator>Paul's Blog</dc:creator>
		<pubDate>Fri, 01 Oct 2004 17:44:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=783#comment-2363</guid>
		<description>&lt;p&gt;&lt;strong&gt;RE: Classes: Creating Custom Objects&lt;/strong&gt;&lt;br&gt;
To Do:  Read this post in it&#039;s entirety, try it, and practice it.&lt;/p&gt;
&lt;p&gt;Encapsulation - a programming best practice, encapsulation allows you to keep related code in one place making debugging easier and leading to...&lt;br&gt;
Portability - with an encapsulate...&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p><strong>RE: Classes: Creating Custom Objects</strong><br />
To Do:  Read this post in it&#8217;s entirety, try it, and practice it.</p>
<p>Encapsulation &#8211; a programming best practice, encapsulation allows you to keep related code in one place making debugging easier and leading to&#8230;<br />
Portability &#8211; with an encapsulate&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dick</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/09/28/classes-creating-custom-objects/#comment-2361</link>
		<dc:creator>Dick</dc:creator>
		<pubDate>Fri, 01 Oct 2004 03:51:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=783#comment-2361</guid>
		<description>&lt;p&gt;JC:  I agree with you to an extent.  I like Chip&#039;s employee class example, but it doesn&#039;t sell me on using classes.  I think guys like Chip and Stephen write such complex applications that abstraction isn&#039;t just good practice, it&#039;s an absolute necessity for maintainability.&lt;/p&gt;
&lt;p&gt;I whole heartedly agree that JW&#039;s control event class is the ultimate example.  It&#039;s easy enough that average Joes like me can use it in their code and that really brings home the realization of the power of the class.&lt;/p&gt;
&lt;p&gt;I started writing an app for Euchre in Excel.  As I was writing it, I thought it would be useful to me to abstract the cards from the logic of the game.  That way if I want to write a different card game, I can move my card object hierarchy (Card, Cards, Player, Stack, etc) and all I have to do is work out the logic of the game.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>JC:  I agree with you to an extent.  I like Chip&#8217;s employee class example, but it doesn&#8217;t sell me on using classes.  I think guys like Chip and Stephen write such complex applications that abstraction isn&#8217;t just good practice, it&#8217;s an absolute necessity for maintainability.</p>
<p>I whole heartedly agree that JW&#8217;s control event class is the ultimate example.  It&#8217;s easy enough that average Joes like me can use it in their code and that really brings home the realization of the power of the class.</p>
<p>I started writing an app for Euchre in Excel.  As I was writing it, I thought it would be useful to me to abstract the cards from the logic of the game.  That way if I want to write a different card game, I can move my card object hierarchy (Card, Cards, Player, Stack, etc) and all I have to do is work out the logic of the game.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jamie Collins</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/09/28/classes-creating-custom-objects/#comment-2360</link>
		<dc:creator>Jamie Collins</dc:creator>
		<pubDate>Wed, 29 Sep 2004 16:21:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=783#comment-2360</guid>
		<description>&lt;p&gt;&quot;Portability - with an encapsulated class, you can move that class to another VBA project and use it there.&quot;&lt;/p&gt;
&lt;p&gt;The popular term is &#039;code reuse&#039;. I prefer this because, as well as reuse in other projects, it applies equally to code reuse within a project. Whenever I find myself copying and pasting chunks of code, I know what I really need is to encapsulate it in a class.&lt;/p&gt;
&lt;p&gt;I&#039;m not being down on you, Dick, but when I was learning I didn&#039;t find it much help to read &#039;abstract&#039; business object descriptions such Chip Pearson&#039;s CEmployee class. I just didn&#039;t get it. I&#039;d think, that&#039;s all very well if you&#039;re dealing with many Employees simultaneously but my apps only ever seemed to have one Employee (or whatever) at a time. I just couldn&#039;t see the incentive of using a class. I didn&#039;t &#039;get&#039; custom objects until I needed them. And when I did, I struck with them.&lt;/p&gt;
&lt;p&gt;I think the ultimate example of the use of a class module is the &#039;common ActiveX event handler&#039; (http://j-walk.com/ss/excel/tips/tip44.htm) or perhaps for Excel it&#039;s the &#039;Application events handler&#039; (http://www.cpearson.com/excel/AppEvent.htm). With these, the benefits of using a class are clear. My personal &#039;ready rolled&#039; favorite is Stephen Bullen&#039;s CFormChanger (FormFun.zip from &lt;a href=&quot;http://www.bmsltd.ie/Excel/Default.htm&quot; rel=&quot;nofollow&quot;&gt;http://www.bmsltd.ie/Excel/Default.htm&lt;/a&gt;) because it encapsulates (i.e. hides) highly complex but extremely useful code.&lt;/p&gt;
&lt;p&gt;Jamie.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>&#8220;Portability &#8211; with an encapsulated class, you can move that class to another VBA project and use it there.&#8221;</p>
<p>The popular term is &#8216;code reuse&#8217;. I prefer this because, as well as reuse in other projects, it applies equally to code reuse within a project. Whenever I find myself copying and pasting chunks of code, I know what I really need is to encapsulate it in a class.</p>
<p>I&#8217;m not being down on you, Dick, but when I was learning I didn&#8217;t find it much help to read &#8216;abstract&#8217; business object descriptions such Chip Pearson&#8217;s CEmployee class. I just didn&#8217;t get it. I&#8217;d think, that&#8217;s all very well if you&#8217;re dealing with many Employees simultaneously but my apps only ever seemed to have one Employee (or whatever) at a time. I just couldn&#8217;t see the incentive of using a class. I didn&#8217;t &#8216;get&#8217; custom objects until I needed them. And when I did, I struck with them.</p>
<p>I think the ultimate example of the use of a class module is the &#8216;common ActiveX event handler&#8217; (<a href="http://j-walk.com/ss/excel/tips/tip44.htm" rel="nofollow">http://j-walk.com/ss/excel/tips/tip44.htm</a>) or perhaps for Excel it&#8217;s the &#8216;Application events handler&#8217; (<a href="http://www.cpearson.com/excel/AppEvent.htm" rel="nofollow">http://www.cpearson.com/excel/AppEvent.htm</a>). With these, the benefits of using a class are clear. My personal &#8216;ready rolled&#8217; favorite is Stephen Bullen&#8217;s CFormChanger (FormFun.zip from <a href="http://www.bmsltd.ie/Excel/Default.htm" rel="nofollow">http://www.bmsltd.ie/Excel/Default.htm</a>) because it encapsulates (i.e. hides) highly complex but extremely useful code.</p>
<p>Jamie.</p>
<p></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stephen Wortley</title>
		<link>http://www.dailydoseofexcel.com/archives/2004/09/28/classes-creating-custom-objects/#comment-2359</link>
		<dc:creator>Stephen Wortley</dc:creator>
		<pubDate>Tue, 28 Sep 2004 19:33:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dailydoseofexcel.com/?p=783#comment-2359</guid>
		<description>&lt;p&gt;Thank you so much for this - I spent a long afternoon last Friday looking for just this information to create an easily-readable excel app at work. As it was, I didn&#039;t find any instructive info, so just wrote in base code :(&lt;/p&gt;
&lt;p&gt;Still, I&#039;m on holiday now, so if it all goes wrong.... &lt;/p&gt;
&lt;p&gt;(It&#039;ll be waiting for me when I get back!)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thank you so much for this &#8211; I spent a long afternoon last Friday looking for just this information to create an easily-readable excel app at work. As it was, I didn&#8217;t find any instructive info, so just wrote in base code <img src='http://www.dailydoseofexcel.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
<p>Still, I&#8217;m on holiday now, so if it all goes wrong&#8230;. </p>
<p>(It&#8217;ll be waiting for me when I get back!)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

