Values and References in VBA

April 25, 2013 in VBA

Visual Basic for Applications has a unique system of data types. One of the most fundamentally important concepts to understand is the difference between values and references in VBA, but it is very difficult to find clear explanations of this concept. I attempt to present one here. In this article I describe the difference between values and references, and between value types and reference types. In another article I will describe how the ByRef and ByVal keywords work. Synonyms When trying to make sense of this article in comparison with other articles and documentation, keep in mind that other sources
…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