+ Reply to Thread
Results 1 to 6 of 6

Loop to populate graph -- Excel "runs out of memory"?

  1. #1
    Registered User
    Join Date
    09-19-2011
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2010
    Posts
    32

    Loop to populate graph -- Excel "runs out of memory"?

    HI, I have a working script that plots 5 sets of data after importing a delimited notepad file. Each column has up to 10,000 data points in it, so I just have it offset by 10,000 rows. Here is the working code I was using as a reference for my question:

    Please Login or Register  to view this content.
    What I am trying to do is modify it to plot any number of points by making a loop that moves from column to column until it hits an empty column. I wrote the code below, but get an "excel is out of memory" error # 7. I was hoping someone could help me find anything that is wrong:

    Please Login or Register  to view this content.
    Thanks!
    Last edited by Dante_Blake; 09-20-2011 at 01:53 PM.

  2. #2
    Valued Forum Contributor tlafferty's Avatar
    Join Date
    04-08-2011
    Location
    United States, Tacoma, WA
    MS-Off Ver
    Excel 2010, Excel 2013 Customer Preview
    Posts
    1,112

    Re: Loop to populate graph -- Excel "runs out of memory"?

    Try declaring the variable DataValue as a long:
    Please Login or Register  to view this content.
    Place the Dim statement at the top of your sub routine as the first line of code.
    If your question has been satisfactorily addressed, please consider marking it solved. Click the Thread Tools dropdown and select Mark thread as solved.
    Also, you might want to add to the user's reputation by clicking the star icon in the lower left corner of the post with the answer- it's why we do what we do...

    Thomas Lafferty
    Analyst/Programmer

  3. #3
    Registered User
    Join Date
    09-19-2011
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2010
    Posts
    32

    Re: Loop to populate graph -- Excel "runs out of memory"?

    I still get the same error. The plot points are to the 6th decimal place. Will rounding them down to 2 or 3 decimal places help?

  4. #4
    Valued Forum Contributor tlafferty's Avatar
    Join Date
    04-08-2011
    Location
    United States, Tacoma, WA
    MS-Off Ver
    Excel 2010, Excel 2013 Customer Preview
    Posts
    1,112

    Re: Loop to populate graph -- Excel "runs out of memory"?

    I'm honestly not sure. You might also try closing other applications, setting the variable type to double instead of long and making sure Excel is set to use all available processors and that multi-threaded calculation is enabled: Excel Options|Advanced|Formulas.

  5. #5
    Registered User
    Join Date
    09-19-2011
    Location
    Atlanta, GA
    MS-Off Ver
    Excel 2010
    Posts
    32

    Re: Loop to populate graph -- Excel "runs out of memory"?

    Found the solution. You have to name it like this...

    Please Login or Register  to view this content.
    ...or you get a memory error.

  6. #6
    Valued Forum Contributor tlafferty's Avatar
    Join Date
    04-08-2011
    Location
    United States, Tacoma, WA
    MS-Off Ver
    Excel 2010, Excel 2013 Customer Preview
    Posts
    1,112

    Re: Loop to populate graph -- Excel "runs out of memory"?

    Thanks for the update.

+ 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