title: Using VBA to read a .csv string into a multidimensional array
body: <p>I'm trying to automate the import of data into a tool I'm building in Excel. The idea is to read the data from a .csv file either directly into an array, or read the data as a string and then parse it using spaces " " and commas "," as delimiters, followed by an array. I've gotten this far:</p>
  
  <pre><code>Public Sub ImportData()
      Dim myData as String, strData() as String
      Dim thisFile as String
  
      thisFile = ActiveWorkbook.Path &amp; "\" &amp; "s.csv"
      Open thisFile For Binary As #1
      myData = Space$(LOF(1))
      Get #1, , myData
      Close #1
  End Sub
  </code></pre>
  
  <p>This gets me to where "myData" is a now string of data separated by commas and spaces (commas delimiting for a new column, spaces delimiting for a new row).</p>
  
  <p>How do I proceed to reconstruct this as a multidimensional (2D) array so that it can be printed onto the sheet I'm working on, or referenced straight from memory? Or is there an easier way?</p>