Jim,
For fixed length, but for variable length much more.
<From Excel Help
String Data Type
There are two kinds of strings: variable-length and fixed-length strings.
A variable-length string can contain up to approximately 2 billion (2^31)
characters.
A fixed-length string can contain 1 to approximately 64K (2^16) characters.
</From Excel Help
NickHK
"Jim Rech" wrote in message
...
String variables have a maximum length of about 64k characters. Maybe
you're exceeding that. Easy to check with Len.
--
Jim
"erikcw" wrote in
message ...
|
| Hi all,
|
| Is there a limit to the size of a variable in VBA? Here is my psuedo
| code:
|
| Dim temp
|
| 'array has about 2000 items (each item is less than 200 letters)
| Loop i=0 To UBound(array)
| temp = temp + vbNewLine + array(i)
| Next
|
| For some reason it won't append past a hundred or so itterations.
|
| Any idea why this is? Do I need to declare the variable as "large" or
| something?
|
| Thanks!
| Erik
|
|
| --
| erikcw
| ------------------------------------------------------------------------
| erikcw's Profile:
http://www.excelforum.com/member.php...o&userid=28797
| View this thread:
http://www.excelforum.com/showthread...hreadid=489190
|