title: String length limit for Split() in VBA Excel macro
body: <p>I'm currently rebuilding an excel macro which parses a text file and fills cells in an excel sheet according to a certain ruleset. My new version is supposed to handle files which extends over a much larger span of time and on a day-to-day basis rather than a summed up result for a week.
  However, it seems that ever since I got these larger files the split command won't return anything.</p>
  
  <pre><code>    rawDataArray = Split(rawData, Chr$(10))
  </code></pre>
  
  <p>While stepping through I can clearly see that the rawData string contains data which I loaded from the source text file, I also opened the file in a hex editor to verify that chr(10) exists as they should. After the operation has been executed the rawDataArray is still empty though.</p>
  
  <p>The previous version only handled text files which were a couple of thousand characters at the most and it worked flawlessly. The current files are approximately 500.000 characters long, and this is the only (well, first ;)) line that won't work, which brought me into the idea that maybe there's an upper limit to how long strings the split command can handle. Could this be true? And if so, how long is it?</p>
  
  <p>Could it also be because we switched from Office 2007 to Office 2010 at my office? I don't know if the vbscript versions act the same and I guess this could be a factor too.</p>
  
  <p>Thanks a lot in advance!</p>
  
  <p>EDIT: I'm not sure if it's customary to answer your own posts with the solution but, here goes.</p>
  
  <p>It seems the split command can't handle such big strings, I tried to reduce the file to ~7k chars and that worked. I haven't found the exact number yet but this seems to be the reason at least.
  Also, thank you Avner for the correction regarding vbscript vs. VBA, I'm self-taught when it comes to programming/scripting so now I learned something new!</p>
  
  <p>Thanks Avner for the correction regarding</p>