Tag Archives: Arrays

Multidimensional Arrays

Multidimensional Arrays In Access it is possible to create an array with more than one dimension. Dim myIntegerArray() as Integer ReDim myIntegerArray(7,52) In the above code, we tell Access to create an array of 364 elements (7×52). In the code below, we create a 3×5 array, fill certain elements with values and print it to […]

Loops – For Each

In this blog post we will be explaining the For…Each loop and providing some examples of its usage. Demonstrating The For Each Loop with An Array We can use the For Each loop over a standard array. Sub forEachArray()          Dim element As Variant     Dim animals(0 To 5) As String     ‘We […]

Working With Arrays 2

In this blog post we will be expanding on the capabilities of arrays in VBA. One of the headaches with arrays is that they are static blocks of memory and are not designed to change in size.  If we want to take an array that can hold 10 items and modify it so that it […]

Working With Arrays 1

In this blog post we introduce arrays and give you some examples of them in action. You can think of an array as a row of boxes with a number on each, 0 to n.  When we first declare an array we must at least state its type and may also state its size (we […]