Collections of Collections in VBA

December 2, 2013 in VBA

In many situations using collections of one kind or another is very useful. Once in a while, you even want to go another step and use collections of collections. Just as there are several types of collections in VBA, there are several ways you can use collections of collections. All of them have benefits and drawbacks. I’ll provide a summary of them here. Nested collection types The three types of nested collections I’ll cover in this article are as follows: Multidimensional arrays Jagged arrays Jagged Collections Multidimensional arrays Good Simple syntax (only one variable) Type safety. All elements of a
…read more

Collections in VBA – Overview

March 27, 2013 in VBA

In VBA programming collections of all types are indispensable. For both the new and experienced VBA programmer there is a lot to know about collection types in VBA, so I’m going to cover them one by one. In this post I’ll provide a quick survey of the available collection types. Types of Collections in VBA There are three fundamental collection types in VBA Array Collection Dictionary Arrays are a language feature and use value-type semantics (they do not use the Set keyword for assignments, for example). Collections and Dictionaries are object types provided by the Visual Basic for Applications library
…read more