VBA Interfaces: The Implements Statement

The VBA Implements statement permits the use of interfaces, a mechanism to build clarity and consistency between multiple classes. As VBA projects grow, interfaces can be a central component of how a developer interacts with classes and custom objects. Overview This is the twelfth post in the Tips and Tricks …

VBA Inheritance: Custom Objects as Class Properties

Inheritance is a concept that permits the transfer of data from one class to another class. While common in many programming languages, it is not native to VBA. In the absence of true inheritance, effective coding can help mimic its behavior.

Bubble Sort for Arrays and Other VBA Data Structures

The bubble sort is a commonly used technique for sorting simple arrays and collections. It can also be used to sort through other common VBA data structures, such as two-dimensional arrays, collections of custom objects, and dictionaries.

Sorting Objects of a Collection Class

One feature noticeably absent from VBA is a built-in function to sort arrays and collections. The bubble sort is a well known technique for sorting groups of elements when no native function exists. With a few minor adjustments, a bubble sort can also be used to sort collections of custom …

Building a Custom Collection Class

A Collection class is a useful means to manage a large group of custom objects. The ability to store multiple classes permits the efficient operation of VBA projects, while keeping code clean and readable.

Building a Custom Class: Part 2

Classes and objects open up a host of opportunities within Excel VBA. In addition to being a powerful feature in their own right, classes can utilize every VBA coding technique, and permit small project teams to work on large-scale VBA projects with ease. By learning and fully understanding VBA classes …

Building a Custom Class: Part 1

If you’ve followed the series up to this point, you have previously worked with intrinsic (built-in) objects like Range, Shape, or Worksheet. In addition to these intrinsic objects, VBA offers the ability to build custom objects through the creation of a class.