title: Copying ADO recordset into excel worksheet
body: <p>I'm trying to open a CSV file and query it and return the results into column A of the second worksheet of "ThisWorkbook". 
  I'm not getting any errors so I do not see why it is not copying the record set into excel.</p>
  
  <pre><code>Dim con As ADODB.Connection
  Dim rs As ADODB.Recordset
  
  Set con = New ADODB.Connection
  Set rs = New ADODB.Recordset
  
  Dim currentDataFilePath As String
  Dim currentDataFileName As String
  
   Dim nextRow As Integer
  
  currentDataFilePath = "C:\Users\M\folder\"
  currentDataFileName = "csv-file"
  
  con.Open "Provider=Microsoft.JET.OLEDB.4.0;" &amp; _
             "Data Source=" &amp; currentDataFilePath &amp; ";" &amp; _
             "Extended Properties=""text;HDR=NO;FMT=Delimited;IMEX=1"""
  
  
  'rs.ActiveConnection = con
  
   rs.Open "SELECT Name FROM [" &amp; currentDataFileName &amp; ".csv] WHERE Datatype ='TYPE3'", 
   con
  
  ThisWorkbook.Worksheets("Sheet2").Range("A:A").CopyFromRecordset rs
   rs.Close
  con.Close
  
  Set rs = Nothing
  Set con = Nothing
  
  
  End Sub
  </code></pre>