> ## Content Index
> Fetch the complete content index at: https://nolongerset.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Great Intro to Class Programming in VBA
- URL: https://nolongerset.com/class-programming-intro/
- Published: 2022-04-05T23:13:29.000Z
- Updated: 2026-05-08T12:58:35.000Z
- Description: Former Access MVP Ben Clothier's primer on class programming in VBA should be required reading for all Access developers.
- Author: Mike Wolfe
- Tags: Class Modules, Intermediate, Interfaces, #Import 2026-05-20 02:59

For a great introduction to class programming in VBA, I can't think of a better starting place than this article from longtime Access MVP, Ben Clothier:

[**VBA Class Modules: Gateway to SOLID Code**](https://rubberduckvba.wordpress.com/2020/02/27/vba-classes-gateway-to-solid/)

## Article Overview

Ben does a great job of explaining both ***why*** you should use class modules and ***how*** to do so with an excellent practical example.

Here's an outline of the article:

- Introduction
- Creating your custom types
- Creating our first class module
- Controlling access to methods via interfaces
- Factory Design Pattern
- Conclusion

I've written about some of these same topics, too. If Ben's article piques your interest, check out the "Further reading" section below for additional information.

### Two Approaches to the Factory Design Pattern

Ben uses a different factory design pattern than I do. 

His approach hides the initialization function in the main class module so that it can't be called accidentally from outside the object factory, but it does require additional class modules. In and of itself, that's not a big deal, but the stock VBA development environment punishes you for having a lot of code modules. 

If you adopt Ben's approach, you should seriously consider using the Rubberduck VBA add-in, which allows you to [group code modules into custom folders](https://github.com/rubberduck-vba/Rubberduck/blob/next/docs/GettingStarted.md#code-explorer).

---

### Further reading

[Parameterized Constructors in VBAVBA does not allow for parameterized constructors. We can work around that, though, using the Factory pattern and a strong naming convention.![](https://nolongerset.com/favicon.png)No Longer SetMike Wolfe![](https://storage.ghost.io/c/eb/d7/ebd732c1-5f03-4f07-b386-5d08557e15c9/content/images/2021/03/Factory-Functions.jpg)](https://nolongerset.com/parameterized-constructors-in-vba/)

[Interfaces, ConceptuallyInterfaces can be a difficult concept to grasp conceptually. To help make sense of the concept, consider these real world examples.![](https://nolongerset.com/favicon.png)No Longer SetMike Wolfe![](https://storage.ghost.io/c/eb/d7/ebd732c1-5f03-4f07-b386-5d08557e15c9/content/images/2020/10/game-2294201_1920.jpg)](https://nolongerset.com/interfaces-conceptually/)

[Interfaces, PracticallyA real world example using Active Directory lookups.![](https://nolongerset.com/favicon.png)No Longer SetMike Wolfe![](https://storage.ghost.io/c/eb/d7/ebd732c1-5f03-4f07-b386-5d08557e15c9/content/images/2020/10/leaves-5667664_1920.jpg)](https://nolongerset.com/interfaces-practically/)

[Backward-Compatible RefactoringHow can you completely change the way you interact with a class without breaking backward compatibility? Interfaces.![](https://nolongerset.com/favicon.png)No Longer SetMike Wolfe![](https://storage.ghost.io/c/eb/d7/ebd732c1-5f03-4f07-b386-5d08557e15c9/content/images/2020/10/typewriter-5626841_1920.jpg)](https://nolongerset.com/backward-compatible-refactoring/)

*Image by [Gerd Altmann](https://pixabay.com/users/geralt-9301/?utm%5Fsource=link-attribution&utm%5Fmedium=referral&utm%5Fcampaign=image&utm%5Fcontent=2775272) from [Pixabay](https://pixabay.com/?utm%5Fsource=link-attribution&utm%5Fmedium=referral&utm%5Fcampaign=image&utm%5Fcontent=2775272)*