Array variable and Collection object

I have a one dimensional array variable that I would like to store 3 different values for each index of the array. The closest thing I can find in VBA Help is Collection Object, but I don't see it as working because I don't think it is structured so that there can be multiple collections based on an index. My array variable will have an index from 1 to up to maybe 2500. What else is there in VBA to handle this situation? I am using Excel. My project concerns optimizing haul patterns in relation to agricultural land grading.


  • Hello,

    If you're using a single dimensional array, you can use the following:

    Dim myArray(10) as string

    myArray(0) = "Value 1"
    myArray(1) = "Value 2"
    myArray(2) = "Value 3"

    Hope this helps!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion