Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Declare Multidimensional Arrays
You might want to consider:
Dim MultidimensionalArray(1 To 3) MultidimensionalArray(1) = Array("a", "b", "c") MultidimensionalArray(2) = Array("d", "e", "f") MultidimensionalArray(3) = Array("g", "h", "i") For i = 1 To 3: For j = 0 To 2 Debug.Print MultidimensionalArray(i)(j) Next: Next Alan Beban Brent McIntyre wrote: Good evening all, I received some help recently regarding Multidimensional Arrays, and now I require some more, any help you may be able to give would be much appreciated. I am setting out a Multidimensional Array, ie. a b c d e f g h i To do this in VBA I would type MultidimensionalArray(1,0) = "a" MultidimensionalArray(1,1) = "b" MultidimensionalArray(1,2) = "c" MultidimensionalArray(2,0) = "d" MultidimensionalArray(2,1) = "e" MultidimensionalArray(2,2) = "f" MultidimensionalArray(3,0) = "g" MultidimensionalArray(3,1) = "h" MultidimensionalArray(3,2) = "i" I am wanting to know if there is a quicker way to do this with less code, ie. MultidimensionArray(1,"a","b","c") MultidimensionArray(2,"d","e","f") MultidimensionArray(3,"g","h","i") This code does not work, but I am sure there must be similar code in VBA somewhere to do this. Any help you may be able to provide would be much appreciated. Yours sincerely, Brent McIntyre |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I write multidimensional arrays in Excel Formulas? | Excel Worksheet Functions | |||
using linest excel function from msaccess with multidimensional ar | Excel Worksheet Functions | |||
Declare Multidimensional Arrays | Excel Programming | |||
Multidimensional Arrays - VBA | Excel Programming | |||
Multidimensional Arrays - VBA | Excel Programming |