CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2001
    Location
    Wisconsin
    Posts
    2

    Redim dynamic Array

    I need to build a array that is quite large. (12500 items or more) When I redim or even declare the array of a UBound greater than 9500 I get a "Out of Memory Error" (Run time error 7).

    Is there a limit to the amount of items a attay can hold? Is there another way to handle this large amount of data?

    Public MyArray() as string

    Redim(10000,10000)

    Any information would be appreciated.

    Thanks Strevy


  2. #2

    Re: Redim dynamic Array


    Redim(10000,10000)??

    so U have a mattrix 10000 x 10000

    Redim(1,10000)


    <center>
    <HR width=80%>
    <img src='http://web.tiscali.it/bertaplanet/im...ertaplanet.gif'>
    </center>

  3. #3
    Join Date
    Jan 2001
    Location
    Wisconsin
    Posts
    2

    Re: Redim dynamic Array

    Thanks for responding. I had a brain fart. I need to redim MyArray(10000,2). I realized this right before I got you email.


  4. #4
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Re: Redim dynamic Array

    I had no problem doing a "ReDim MyArray(100000,2)" but there was nothing in the elements. Since you are not trying to preserve the aray contents, try doing an "Erase MyArray" first to free up storage.

    John G

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

Featured