title: With VBA, how do I close an Excel workbook without closing all workbooks?
body: <p>Using Access VBA, I want to open an XL file, do stuff, then close it without closing other XL files that are open.</p>
  
  <p>Option 1: If the last line is "<code>ObjXL.Application.Quit</code>", that closes ALL open Excel files, not just the current one.</p>
  
  <p>Option 2: If the last line is "<code>ObjXL.Close</code>", then the workbook closes, but that particular instance of XL stays open (i.e. Excel without a workbook).  </p>
  
  <p>So, how do I close an Excel workbook without closing any other workbooks that are open?</p>
  
  <pre><code>Sub x()
      Dim ObjXL As Excel.Workbook
      Set ObjXL = GetObject("C:\Reports\Adhoc Default.xls")
      ObjXL.Application.Visible = True
      ObjXL.Windows(1).Visible = True
      ObjXL.Worksheets(1).Activate
      DoStuff()
      ObjXL.Save
      Option1/2/3?
  End Sub
  </code></pre>