title: How to close ONLY the instance of Excel that was opened by OLEFormat.Activate
body: <p>Ok, I'm creating a Word document (based on a template) from MS Access and updating several charts by using the OLEFormat object.  Once I .Activate the object, which creates a new instance of Excel, and make my edits, I close that instance of Excel with:</p>
  
  <pre><code>wdChart.ChartData.Workbook.Application.Quit
  </code></pre>
  
  <p>This works fine if there are no other instances of Excel running.  But, if there is an open instance of Excel when the OLEFormat.Activate happens, it doesn't create a new instance of Excel, but opens the chart spreadsheet in the same instance of Excel that is open.  So when I execute the .Application.Quit command, it closes ALL open workbooks in that instance and prompts me to save the workbook.  At this point, I get a Word message that says:</p>
  
  <blockquote>
    <p>To insert a chart, you must first close any open dialog boxes or
    cancel editing mode in Microsoft Excel</p>
  </blockquote>
  
  <p>The my code fails with a:</p>
  
  <blockquote>
    <p>Method 'Activate' of object 'ChartData' failed</p>
  </blockquote>
  
  <p>I think these errors have to do with the fact that my code is sequentially editing several charts.  When the Word dialog pops up, my code is still trying to run or something.</p>
  
  <p>I think what would solve all of this is if there is a way to force the OLEFormat.Activate to open it's own instance of Excel.  Is this possible?</p>