Multidimensional Arrays - VBA

B

Brent McIntyre

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
 
A

Alan Beban

Brent said:
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
 
B

Brent McIntyre

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
 
A

Alan Beban

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

Alan Beban
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top