Consulting

Results 1 to 2 of 2

Thread: "Out of Memory" error thrown when Formula contents length exceeded

  1. #1

    "Out of Memory" error thrown when Formula contents length exceeded

    This is an informational post only...

    I iterated through a range of cells and generated a string of cell names to create a simple "=name1+name2+..." that would later be applied to the .Formula property.

    Unbeknownst to me at the time that there's a 1024-byte limit to the Formula property. So when I tried to set .Formula to this 1546-byte string variable, Excel threw an "Out of Memory" error, which IMHO is very misleading.

    Granted, I exceeded the bounds of a property, and the debugger stopped at that line of code, but when you search the web for this particular error, most docs tell you to look at excessive object creation, poor coding techniques, strings in excess of 32,767, etc, etc.

    Excel really wasn't OOM, I just unknowningly overflowed a single property.

  2. #2
    Since my forum "post count" is now > 5, here's the link that I tried to supply w my original post that shows Excel's maximums.

    http://office.microsoft.com/en-us/ex...005199291.aspx .

Posting Permissions

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