Tag Archives: Arrays

How to Check if an Array Is Empty in VBA

When a list or collection of items that are the same data type are stored in continuous memory locations, we call it an array. Arrays are useful objects that are widely used in software development to organize data. Some real examples of where you might

What is a VBA Dictionary?

A dictionary is an object in VBA (similar to a collection) that stores data like an array. It can be used to store data of any type except an array. A VBA dictionary has two parts: Key Value …where key is simply a reference to the

The ReDim Statement in VBA

The ReDim statement is used to declare the size of a Dynamic array in VBA.  It can later be used to re-declare the size of the array as many times as you need.  It can only be used for Dynamic VBA Arrays (where the size

No Thumbnail

Excel VBA, Arrays and Ranges

When modifying worksheets and ranges, one option would be to modify the worksheet directly using the commands I’v explained in the article Referencing Ranges In Excel Using VBA but that would be very inefficient. Every time you read or write something to an excel sheet, you will be consuming considerable

No Thumbnail

VBA Arrays and Userdefined Functions and Subs

In this article I will cover the following topics: Passing Arrays as Input Parameters to Functions and Subs ByRef Passing Arrays as Input Parameters to Functions and Subs ByVal Getting the dimension of the Input Array to Function or Sub: Declaring Functions With an Array

No Thumbnail

VBA, Working With Arrays

In this article I will explain some of the main concepts of working with arrays. Using arrays is a great way of working with lists or groups of variables. Jump To: Arrays, Static Vs Dynamic Declaring Static Arrays 1 Dimensional Static Arrays 2 Dimensional Static