+ Reply to Thread
Results 1 to 7 of 7

Get error when declaring a jagged array?

  1. #1
    Forum Contributor
    Join Date
    08-14-2008
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    103

    Get error when declaring a jagged array?

    hi,
    I'm trying to create an array of arrays (a jagged array). According to Microsoft's VB developer center I can declare in the following ways:

    Please Login or Register  to view this content.
    But when I try this I get a compile error at the second parentheses.
    What as I doing wrong?
    Last edited by HammerTime; 01-13-2010 at 11:33 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Get error when declaring a jagged array?

    Hello hammertime,

    Can you post the site address where you found this? I have never encountered any coding procedure in VB or VBA like this.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Contributor
    Join Date
    08-14-2008
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    103

    Re: Get error when declaring a jagged array?

    oops! I'm a dumbass, this is for .NET (see link below if interested)

    http://msdn.microsoft.com/en-us/library/95a4acwh.aspx

    aplogies for my n00bishness

    Is there a way to declare an Array of Arrays in VB6?

  4. #4
    Valued Forum Contributor
    Join Date
    10-15-2007
    Location
    Home
    MS-Off Ver
    Office 2010, W10
    Posts
    373

    Re: Get error when declaring a jagged array?

    Hi

    This is a forum for vba, not vb. I could give you an example in vba but I'm not sure it will be the same in vb.

  5. #5
    Forum Contributor
    Join Date
    08-14-2008
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    103

    Re: Get error when declaring a jagged array?

    Quote Originally Posted by lecxe View Post
    Hi

    I could give you an example in vba.
    That would be great if possible

  6. #6
    Valued Forum Contributor
    Join Date
    10-15-2007
    Location
    Home
    MS-Off Ver
    Office 2010, W10
    Posts
    373

    Re: Get error when declaring a jagged array?

    This is an example for a jagged array with 3 elements in the first level.

    Second level:
    - the first element is an array with 5 Doubles
    - the second element is an array with 10 Doubles
    - the third element is an array with 20 Strings

    Please Login or Register  to view this content.
    Remark: you could, of course, add more levels.

  7. #7
    Forum Contributor
    Join Date
    08-14-2008
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    103

    Re: Get error when declaring a jagged array?

    Thanks lecxe

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1