title: Excel crashes on ADODB connection open command
body: <p>I'm trying to use vba in Excel (2013) to use ADODB connection and SQL to query and collate data from another tab.    My laptop is running Windows 10 Pro 64-bit(10.0.17763)   and Excel Standard 2013 64-bit (15.0.5233.1000)</p>
  
  <p>I have tried removing and re-adding my Active X References, but has not solved the issue.  I've also tried removing all possible references and re-adding them one by one as well as trying to use older versions.   All result in the same result.   My references chosen are:    Visual Basic for Applications, Microsoft Excel 15.0 Object Library, OLE Automation, Microsoft Office 15.0 Object Library, Microsoft Forms 2.0 Object Library, Microsoft ActiveX Data Objects 6.1 Library, Microsoft ActiveX Data Objects Recordset 6.0 Library.</p>
  
  <p>When I get to the cnExcel.Open in the below code, excel just crashes(i.e. closes) with no error messages.</p>
  
  <pre class="lang-vb prettyprint-override"><code>Dim cnExcel As Connection
  Dim rsExcel As Recordset
     .....
  strFile = ThisWorkbook.FullName
  strCon = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=""C:\Users\trheinsc\Desktop\InProgress\Error Dashboard_TEMPLATE.xlsm"";Extended Properties=""Excel 12.0;HDR=Yes;IMEX=1"";"
  Set cnExcel = CreateObject("ADODB.Connection")
  Set rsExcel = CreateObject("ADODB.Recordset")
  rsExcel.CursorLocation = adUseClient
  cnExcel.Open strCon                     ' &lt;=  This is where Excel blows up and shuts down.
  
  ' Populate Iteration Columns
  sqlSelect = "SELECT DISTINCT [Iteration]"
  sqlFrom = "FROM [ErrorDetail$]"
  sqlWhere = "WHERE [Iteration] Is Not NULL"
  sqlGroup = ""
  sqlOrder = "ORDER BY [Iteration] DESC"
  sqlString = sqlSelect &amp; " " &amp; sqlFrom &amp; " " &amp; sqlWhere &amp; " " &amp; sqlGroup &amp; " " &amp; sqlOrder
  rsExcel.Open sqlString, cnExcel
  cDashRow = 1
  cDashCol = FirstIterCol
  Do
      If rsExcel.EOF Then Exit Do
      shDashboard.Cells(cDashRow, cDashCol) = "Iter " &amp; rsExcel(0) &amp; Chr(10) &amp; "# Errors"
      shDashboard.Cells(cDashRow, cDashCol).Columns.AutoFit
      aIterArray(cDashCol) = rsExcel(0)
      cDashCol = cDashCol + 1
      rsExcel.MoveNext
  Loop Until rsExcel.EOF
  LastIterCol = cDashCol - 1
  If rsExcel.State = 1 Then rsExcel.Close
  </code></pre>
  
  <p>Any assistance would be greatly appreciated. </p>