Results 1 to 2 of 2

Thread: 2d arrays

  1. #1

    Thread Starter
    Member
    Join Date
    Feb 2006
    Posts
    39

    Question 2d arrays

    I'm using VBA in a who wants to be style millionaire game that i'm making and I would like to experiment by using a 2d array in it. I have never used one beofre so I was hoping that anyone here who knows about using 2d arrays in VBA could help me.

    basically I want the array to go something like this,

    1. Question 1 = 500
    2. Question 2 = 1000
    3. Question 3 = 2000
    etc.

    or

    Array(1, 500)

    I know that this isn't right (is it?) from what i've seen so far about 2d arrays and I was hoping that someone could help me.

    Thanks.

  2. #2
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Re: 2d arrays

    Code:
    dim aryMonies() as long
    
    redim aryMonies(15)
    aryMonies(0)=500
    aryMonies(1)=1000
    'etc..
    '16th entry \/
    aryMonies(15)=1000000

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width