title: Vba closing excel applications/workbooks freezes
body: <p>I have a problem with the following code:</p>
  
  <pre><code>Dim excelapp as object
  set excelapp = CreateObject("excel.application")
  dim ws as object
  dim wb as Workbook
  
  wb= excelapp.Workbooks.Open(path)
  ws= wb.Sheets(1)
  'in the code i send the worksheet object around by reference in order to read the
  'worksheet and manipulate data, i dont create other instances of excel apps or
  'workbooks
  </code></pre>
  
  <p>then i try :</p>
  
  <pre><code>wb.Close
  </code></pre>
  
  <p>and i have also tried :</p>
  
  <pre><code>excelapp.Quit
  </code></pre>
  
  <p>Neither have worked, they both freeze and say they are waiting on OLE actions, and i have multiple excel processes opening if i do not call these, when i try to open the excel files i had opened via code, i can only open them as read-only because theyre checked out to me.</p>
  
  <p>I also tried executing a shell script that closes all applications "Excel.Exe" but it closes...the actual excel file where the vba is being executed, so thats not a good solution.
  Thank you in advance.</p>