title: How to close excel correctly using vbscript
body: <p>Here is the sub</p>
  
  <pre><code>Sub test()
  With ThisWorkbook
  .Worksheets("Sheet1").Range("A1").Value = 5
  .Save
  End With
  End Sub
  </code></pre>
  
  <p>Here is the vbscript that starts the sub</p>
  
  <pre><code>Dim ObjExcel, ObjWB
  Set ObjExcel = CreateObject("excel.application")
  Set ObjWB = ObjExcel.Workbooks.Open("C:\Users\Owner\Desktop\Book1.xlsm")
  ObjExcel.Visible = True
  ObjExcel.Run "Book1.xlsm!test"
  ObjWB.Close False
  
  Set ObjExcel = Nothing ' Should I use  ObjExcel.Quit instead ?
  'if i use both I get the error
  </code></pre>
  
  <p>I get the following vbscript run - time error </p>
  
  <p><img src="https://i.stack.imgur.com/RIbNw.png" alt="enter image description here"></p>