Storing Arrays as Class Properties

There may be situations where a single class property is needed to store multiple values. This can support a list of data or provide the foundation for a loop. VBA classes provide the framework to store arrays as class properties. Overview This is the ninth post in the Tips and …

Series Highlights and VBA Cheat Sheet

As we approach the close of the Getting Started with VBA series, it’s important to take a broad look at all topics discussed. This post will act as a reference for general syntax, concepts, and other topics.

Creating and Using Multi-Dimensional Arrays in VBA

Building upon the one-dimensional array tutorial, multi-dimensional arrays provide an opportunity to easily create or transfer large tables of data. In many instances, thousands of data points can be created with a few simple lines of code. Note: multi-dimensional arrays can be inefficient and difficult to manage for complex sets …

Creating and Using One-Dimensional Arrays in VBA

Imagine a situation where you want to store a list of items in VBA code, such as a simple program to manage a shopping list. An inexperienced programmer may think about creating a new variable for each item to be stored in the list, such as itemOne = “Bread”, itemTwo …

Cycling Through Collections Using a VBA For Each Loop

As a VBA developer, you will work with collections of objects and arrays of data. There will frequently be a need to either list all items within the group, or extract a specific element from the group. One of the most effective ways of doing this is with a For …