Results 1 to 4 of 4

Thread: Array within array!

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Mar 2002
    Posts
    229

    Array within array!

    How do you put an array within an array.
    In c++, you can have Array[0][3] = "". How do u dim those kind of arrays in VB?

  2. #2
    Frenzied Member
    Join Date
    Jul 2002
    Posts
    1,370
    Multidimensional array:

    Code:
    Dim a(10)(20) as String

  3. #3
    Hyperactive Member Blinky Bill's Avatar
    Join Date
    Mar 2002
    Location
    Happily munching on the greenery in your garden
    Posts
    349
    I'm pretty sure its actually defined

    VB Code:
    1. Dim multiArray(10,10) as String
    We don't know what's wrong. . . So the best bet might be to remove something surgically.

  4. #4
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    BTW: Technically it's a MULTI-DIMENSIONAL array, not an array in an array.
    An array in an array would look something like this.....

    VB Code:
    1. Dim arrText() as String
    2. Dim arrText2() as variant
    3.  
    4. ReDim arrText(2)
    5. arrText(1) = "This is"
    6. arrText(2) = "a test."
    7.  
    8. ReDim arrText2(1)
    9. arrText2(1) = arrText
    Getting it back out would be FUBAR.
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

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