View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
smurray444 smurray444 is offline
external usenet poster
 
Posts: 5
Default VBA Runtime error 14: Out of string space... help!

Hi - thanks for your reply.

When I select debug, the following is highlighted in yellow:
Line Input #FileNum, ResultStr

This VBA code I got from the Microsoft website (see original post), so
should in theory work. However, I'm open to suggestions for alternatives if
getting it to work appears unfeasible and someone is feeling creative!
(Basically the mission is to import a large text file of ~84MB into Excel,
splitting it over worksheets when the maximum number of rows has been reached.

Many thanks again,
Steve

"CoRrRan" wrote:

smurray444 wrote:
Dear all,

I'm using the VBA code found at the following URL to import a large text
file into Excel 2007 across several worksheets:

http://support.microsoft.com/kb/120596/EN-US/

The only change that I've made is to update the maximum row number from
65536 to 1048576 to account for this version of Excel.

However, when I run the code I receive the following error:

Run-time error 14: Out of string space.

Does anyone have any ideas as to what this refers to and how I might go
about solving it? I've tried Googling this and it would suggest that maybe
memory is the limiting factor - however, I'm using a PC with 4GB of memory
(the text file I'm using is around 84MB)...!

Thanks for your help,
Steve


Perhaps you are encountering the limitation of the String datatype,
which is set at 2^31 characters in VBA. (At least, that's what the
limitation is for Excel 2003. I'm not sure whether Excel 2007 uses a
different version of VBA.)

Can you tell us on what line you get that error?

CoRrRan