ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Multidimensional Arrays - VBA (https://www.excelbanter.com/excel-programming/273425-multidimensional-arrays-vba.html)

Brent McIntyre

Multidimensional Arrays - VBA
 
Hi all,

I was wondering what the best way to set-up a
multidimensional array within VBA is.

Here is an example of what I want to do:

Main Variable in array 1 2
Second variable in array Lion Fishing Cat
Third variable in array Big Small

Except in reality I have 151 rows of data and 6 columns
and I want it all to programatic and not refer to a
worksheet.

Any help you may be able to provide would be greatly
appreciated.

Yours sincerely,

Brent McIntyre

Alan Beban[_3_]

Multidimensional Arrays - VBA
 
Brent McIntyre wrote:
Hi all,

I was wondering what the best way to set-up a
multidimensional array within VBA is.

Here is an example of what I want to do:

Main Variable in array 1 2
Second variable in array Lion Fishing Cat
Third variable in array Big Small


Er, uh, What is it you want to do?

Alan Beban


Brent McIntyre

Multidimensional Arrays - VBA
 
Good afternoon all,

I was wondering if anyone is able to enlighten me as to
an easier way to programatically write in values for
Mulitdimensional Arrays.

In my recent project I worte them as below:

Array(1,0) = "Cat"
Array(1,1) = "Feline"
Array(1,2) = "Tabby"

Unfortunately VBA wouldn't let me write them as per below:

Array(1,"Cat", 'Feline", "Tabby")

So I was wondering if anyone had any other ways so that I
could cut out a couple of hunder rows of code.

Any help would be much appreciated.

Yours sincerely,

Brent McIntyre

Alan Beban[_3_]

Multidimensional Arrays - VBA
 
I can't tell what your problem is. What are you starting with and what
are you wanting to end up with?

Alan Beban

Brent McIntyre wrote:
Good afternoon all,

I was wondering if anyone is able to enlighten me as to
an easier way to programatically write in values for
Mulitdimensional Arrays.

In my recent project I worte them as below:

Array(1,0) = "Cat"
Array(1,1) = "Feline"
Array(1,2) = "Tabby"

Unfortunately VBA wouldn't let me write them as per below:

Array(1,"Cat", 'Feline", "Tabby")

So I was wondering if anyone had any other ways so that I
could cut out a couple of hunder rows of code.

Any help would be much appreciated.

Yours sincerely,

Brent McIntyre




All times are GMT +1. The time now is 01:41 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com