title: how do i use ADODB connection in vba
body: <ol>
  <li>I need data by array</li>
  <li>Target file is on the network and data value added in a 10 sec</li>
  <li>Need to connect to this file (<code>.xls</code>) and make a real time chart</li>
  </ol>
  <p>Now the problem is how do I use <code>ADODB</code> for this opened file</p>
  <p>2 case happen:</p>
  <p>1st:</p>
  <pre><code>dim path as string, DB as string
  dim cnt as ADODB.Connection
  OLEDB = &quot;Provider=Microsoft.ACE.OLEDB.12.0;Data Source=&quot; &amp; path &amp; DB &amp; &quot;; 
  extended properties=&quot;&quot;excel 12.0 xmlHDR=YES&quot;&quot;;&quot;
  Set cnt = New ADODB.Connection
  cnt.Open OLEDB
  </code></pre>
  <p>Then i got &quot;cant find ISAM installation&quot; error</p>
  <p>2nd:</p>
  <pre><code>dim path as string, DB as string
  dim cnt as ADODB.Connection
  OLEDB = &quot;Provider=Microsoft.Jet.OLEDB.4.0;Data Source=&quot; &amp; path &amp; DB &amp;&quot;; 
  extended properties=&quot;&quot;excel 8.0;HDR=YES;IMEX=1;';&quot;&quot;&quot;
  Set cnt = New ADODB.Connection
  cnt.Open OLEDB
  </code></pre>
  <p>Then I got <code>3706 runtime error, cant find supporter</code></p>
  <p>So what is wrong with me?</p>