[Search tip detail and code files using keywords, tip number, author name, etc ]
    For tip to function correctly, you must ensure that the downloaded file name matches the file name
    displayed in the Rename File To field. Please rename downloaded files when necessary.
Class Modules in VBA
Tip# CADCLIN1104 By Mike Tuersley On 01-Nov-2004
Rated By 1 users Downloaded : 524
Categories : Misc. User Tools, VBA Code Modules
Software type : AutoCAD
Rename File To : CADClinic_Nov04_Code.zip
First of two-part series on class modules in VBA.

For some reason, class modules seem daunting at first. Most VBA books brush over the topic, leaving it to the reader to discover. Which usually means the reader never looks very far into class modules and, therefore, doesn't take advantage of what classes have to offer. Let's change that over the next two months! This month is the first installment in a two-part series on programming with class modules. While the focus will be on VBA, VB programmers can benefit from this information as well.
A class, in layman's terms, is a user-defined programming object. This is not to be confused with a custom AutoCAD object! This programming object exists only within the program, not within the drawing. Class modules represent a vehicle to provide:

reusable/portable code
temporary data storage
simpler coding structure
Classes are just like internal VBA or AutoCAD objects: They can have properties, methods, and events. We will look at all of these over the next two months.



Average Rating:

User comments