Adding a Class ModuleThis content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
To add a class module to your Microsoft® Visual Basic® for Applications (VBA) project, click Class Module on the Insert menu in the Visual Basic Editor. Then name the class module by setting its Name property in the Properties window. Keep in mind that the class module will be treated as an object, so use a name that suggests the object's functionality. The name that you assign to the class module will also be the name under which it appears in the Classes list in the Object Browser.
If you have been following naming convention for standard modules, you can forgo the three-letter prefix here. It is best to name an object intuitively.
Why Build Your Own Objects? | Basic Class Concepts | Creating Property Procedures | Creating Events and Event Procedures | Extending Objects Through Interfaces | Designing Object Models | Creating Custom Objects for Web Pages