title: I am getting a error on my vba code - method open of object connection failed- run time error - 2147467259
body: <p>My excel has recently been updated to the office 365 version.</p>
  <p>I have pasted the code I am using below -</p>
  <pre><code> Sub sbADOExample()
  
     Dim sSQLQry As String
     Dim ReturnArray
     Dim Conn As New ADODB.Connection
     Dim mrs As New ADODB.Recordset
     Dim DBPath As String, sconnect As String
  
     Dim MyFolder As String
     Dim MyFile As String
     MyFolder = Application.ActiveWorkbook.Path
     MyFile = Application.ThisWorkbook.Worksheets(&quot;FTE Updates&quot;).Range(&quot;E12&quot;)
     MySheet = &quot;Report&quot;
  
     DBPath = MyFolder &amp; &quot;\&quot; &amp; MyFile
  
     Workbooks.Open Filename:=MyFolder &amp; &quot;\&quot; &amp; MyFile
  
     sconnect = &quot;Provider=Microsoft.ACE.OLEDB.12.0;Data Source=&quot; &amp; DBPath _
     &amp; &quot;;Extended Properties=&quot;&quot;Excel 8.0;HDR=Yes;IMEX=1&quot;&quot;;&quot;
  
     Conn.Open sconnect
  </code></pre>
  <p>Conn.Open sconnect- this is the line where the error is occuring.</p>