Free templates
Meny Search Free templates

Multi-dimensional array in Excel (VBA and VB6) | Free code

Here you can download free code that shows how a multidimensional array can be used in VBA code for programming in Excel.

A multidimensional array is an indexed list consisting of more dimensions than one in which each dimension has its base at zero. A two-dimensional array can be described as consisting of columns and rows just like a table in a database or a worksheet in Excel. A multidimensional array can be created for all data types such as String, Integer, Date and Object.

When a multidimensional array is created in VBA (VB6) you must determine the size of each dimension, and you must enter a number (not variable) for the size of each dimension. The fact that you have to determine the size of each dimension in a multidimensional array when it is created in VBA (VB6) implies that a multidimensional array is not particular flexible.

A better alternative to a multidimensional array may be a one-dimensional array of objects, or a collection of objects. To create your own objects you need to create a class module that contains variables and properties.

In this template with free code for a multi-dimensional array in Excel, there is a method in a module where a multidimensional array is created and the values in this multi-dimensional array are exported to a worksheet in the workbook.
Updated: 01-01-2015 | Created by All-templates.biz

Download Multi-dimensional array in Excel (VBA and VB6) | Free code ยป

Tags: excel list collection code