title: Run time error '3706': Provider cannot be found - Excel VBA "Provider=Microsoft.Jet.OLEDB.4.0"
body: <p>I saw that this error isn't new, but I can't find the solution.</p>
  
  <p>I have one xls file that use one sheet like as db and with ADODB i get the recordsets that I need.</p>
  
  <p>The code is Very simple and work right for each pc(5) that I tested, with WIN7, WIN10, 32 or 64 bit.</p>
  
  <p>But I've on PC, it's customer Pc, that get me this error: <code>Run time error '3706': Provider cannot be found</code>,
  I has checked the WIN version, the office version, they are the same like other PC, WIN10 64 Bit, MS Office 32Bit</p>
  
  <p>There are more control that I've to do to resolve this problem?!?!
  thanks for any suggestions
  fabrizio</p>
  
  <p>My xls file have 2 sheet, 1th named "dati" with two columns (Anno, Pezzi), 2th named "test" empty, this is the code:</p>
  
  <pre><code>Sub testConn()
  Dim cn As New ADODB.Connection
  Dim rs As New ADODB.Recordset
  Dim strsql As String
  Const adOpenStatic = 3
  Const adLockOptimistic = 3
  Const adCmdText = &amp;H1
  
  
  Set cn = CreateObject("ADODB.Connection")
  Set rs = CreateObject("ADODB.Recordset")
  
  Set rs = New ADODB.Recordset
      #If Win64 Then
          cn.Open "Provider=Microsoft.Jet.OLEDB.12.0; Data Source=" &amp; ThisWorkbook.FullName &amp; "; Extended Properties=""Excel 8.0;HDR=Yes;"";"
      #Else
           cn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" &amp; ThisWorkbook.FullName &amp; "; Extended Properties=""Excel 8.0;HDR=Yes;"";"
      #End If
  
  strsql = "SELECT anno, Sum(Pezzi)as Tpz from [dati$] group by anno"
  
  rs.Open strsql, cn, adOpenStatic, adLockReadOnly, adCmdUnspecified
  rs.MoveFirst
  With Worksheets("test")
      .Cells.ClearContents
      .Range("A1") = "Anno"
      .Range("B1") = "T.Pz"
      .Range("A2").CopyFromRecordset rs
      .Activate
      .Select
  End With
  End Sub
  </code></pre>
  
  <p>these references was added into file:</p>
  
  <pre><code>Microsoft ActiveX Data Objects 6.1 Library
  Microsoft ActiveX Data Recordset 2.8 Library
  </code></pre>