AddIn - ObjectDev. A Class Building Addin



This whole project began because of my utter loathing for Visual Basic’s Class Builder utility. I spent long amounts of time creating COM objects with repetitive coding. I also became interested in VB add-ins. I then decided to write my own Class Builder utility. I named it ObjectDev because it helps you develop objects. ObjectDev requires a knowledge of COM both to use it and to understand its code. I hope you find ObjectDev a useful and informative tool.

What ObjectDev Does:

ObjectDev allows the user to specify any number of subs, functions, and properties. If Create Interface is selected, ObjectDev then generates an interface and an object which implements the interface. If Create Interface is not selected, then ObjectDev creates an object with no interface. If Persistable is selected, code is added to the ReadProperties and WriteProperties functions which enables persistence. If IsDirty is selected, a property let/get and a boolean is added to the objects. When a property is changed, the IsDirty boolean changes to True. ObjectDev will cut hours off the time required to create components for your program.


When I first began designing ObjectDev, I noticed that if you show another form, the variables on the original form do not hold their values. The best way around this problem was to create global variables to hold the information.


Since I wanted ObjectDev to be flexible, I decided to allow the prefixes on all variables to be changed. Since I allowed this changing, I needed something to hold the prefixes, and CPrefixes was born. CPrefixes is just a straightforward object that does nothing but hold data.

CProperty and CPropertyCollection:

In order to store the properties created by the user, I wrote an object/collection. The properties/functions of CProperty are detailed below. The collection is self-explanatory.

  • PropName - the name of the property

  • ReturnType - enumeration of the type of the property (i.e. string, variant, etc.)

  • Style - specifies if the property is Let/Get, Set/Get, Get (an object), or Get

  • RetAsStr - returns a string with the ReturnType spelled out (i.e. “string”, “variant”, etc)

  • VarName - returns the name of the property’s variable (i.e. ByVal sName as String) if you pass True, then either ByVal or ByRef is added on the front

  • ByType - specifies if the property’s variable is passed ByRef or ByVal


CSubFunction and CSubFunctionCollection:

In order to store the subs/functions created by the user, I wrote these objects. The properties/functions of CProperty are detailed below. The collection is self-explanatory.

  • Arguments - holds the arguments collection for this sub/function (see the doc on CArgument and CArgumentCollection)

  • IsPrivate - specifies if the sub/function is private or public

  • RetAsStr - returns a string with the function return type spelled out (i.e. “string”,“variant”, etc.)

  • ReturnType - an enum which specifies the function return type

  • SubName -the name of the sub/function which will be written in code


CArgument and CArgumentCollection:

In order to store the arguments of each subs/function created by the user, I wrote these objects. The properties/functions of CProperty are detailed below. The collection is self-explanatory.

  • ArgName - the name of the argument which will be written to code

  • ArgOptional - specifies if the argument is optional or not

  • ArgType - the type of the argument (i.e. string, variant, etc.)

  • ByType - specifies if the argument is passed ByVal or ByRef

  • ByTypeAsString - returns “ByVal” or “ByRef” depending on what ByType is

  • TypeAsString - returns a string with the argument type (i.e. FuncName As String, FuncName As Variant, etc.)


Legal Garbage:

I developed this add-in for my personal growth as a Visual Basic developer. I also feel that programmers should help each other out as much as possible. Therefore, I really do not care what you do with this code. I would prefer that you just not compile my code and show everyone this wonderful add-in you created, but you can. If you improve my code, I would appreciate if you give me some credit, but you do not have to. Also, if you improve on my code, I would like you to send your code to me ( In short, you can do whatever you want to with my code. You do not have to give me any compensation or recognition.


I hope you either learn from ObjectDev, find it useful, or both. I would appreciate your comments. Also, I would appreciate a quick email if you find something wrong. Please send all emails to

Download Zipped Project File (30k)


  • Add.Ins

    Posted by Legacy on 05/30/2003 12:00am

    Originally posted by: Nanda

    I wish u can perform Excelent task..
    bye at the movement...

  • Nice Stuff

    Posted by Legacy on 05/18/2003 12:00am

    Originally posted by: Edward Wittlinger

    To Whom It May Concern:

    I will pass this onto my development team and see if we can use this utility. I would like for you, to get back with me if you have more documentation on this project.

    Edward Wittlinger - Chief Software Architect

  • son thuan

    Posted by Legacy on 09/25/2002 12:00am

    Originally posted by: son thuan

    thank for supporting me !

  • Great!

    Posted by Legacy on 09/21/2002 12:00am

    Originally posted by: Rod Mason

    I like to see VB developers create useful tools.
    If you develope any more please let me know.
    -Rod Mason

  • rockin dude

    Posted by Legacy on 08/02/2001 12:00am

    Originally posted by: testure

    yeah I hate the class builder in this is great :)
    good work!

  • Nice

    Posted by Legacy on 05/21/2001 12:00am

    Originally posted by: c.cheese

    Very nice!

  • Thanxxx

    Posted by Legacy on 05/18/2001 12:00am

    Originally posted by: Erik

    Handy timersaver !

  • Thanks...

    Posted by Legacy on 03/26/2001 12:00am

    Originally posted by: CoolDaddy

    I was just as frustrated as you were with the CBU of VB and was looking to do something similar. I then ran acrooss this bit of code which gave me an additional head start.


    p.s. Ignore the thanks in CBGB

Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Anthony Christie, the Chief Marketing Officer for Level Communications, is responsible for customer experience, worldwide marketing and product management. In this informative asset, he shares his insights into why a private network connection to cloud-bases applications is the right decision for your enterprise. Download now to find out more.

  • Enterprises are increasingly looking to platform as a service (PaaS) to lower their costs and speed their time to market for new applications. Developing, deploying, and managing applications in the cloud eliminates the time and expense of managing a physical infrastructure to support them. PaaS offerings must deliver additional long-term benefits, such as a lower total cost of ownership (TCO), rapid scalability, and ease of integration, all while providing robust security and availability. This report …

Most Popular Programming Stories

More for Developers

RSS Feeds

Thanks for your registration, follow us on our social networks to keep up-to-date