title: loading Data in VBA from a text file
body: <p>I am not very familiar with VBA but need to use it for a new software program I am using (not Microsoft related)</p>
  
  <p>I have a text file that has columns of data I would like to read into VBA.</p>
  
  <p>Specifically the text file has 4 entries per row. Thus I would like to load in the column vectors (N by 1).</p>
  
  <p>The text file is separated by a space between each entry.</p>
  
  <p>So for example I want to load in column one and save it as array A, then column two and save as array B, then column three and save as array C, and then column four and save as array D.</p>
  
  <p>This code snippet found below from <a href="http://www.tek-tips.com/faqs.cfm?fid=482" rel="nofollow noreferrer">http://www.tek-tips.com/faqs.cfm?fid=482</a> is something I found that can load in text to an array, but I need to adapt it to be able to save the columns as different arrays as specified above...</p>
  
  <p><code>Open "MyFile.txt" For Input As #1<br>
  ReDim Txt$(0)<br>
  Do While Not EOF(1)<br>
      ReDim Preserve Txt$(UBound(Txt$) + 1)<br>
      Input #1, Txt$(UBound(Txt$))<br>
  Loop<br>
  Close #1</code></p>