title: Getting error on closing excel macro using vbscript
body: <pre><code>Dim ObjExcel, ObjWB
  
  Set ObjExcel = CreateObject(&quot;Excel.Application&quot;)
  Set ObjWB = ObjExcel.Workbooks.Open(&quot;C: \Net_Zero_Final.xlsm&quot;,0,True)
  
  ObjExcel.Visible = True
  
  ObjExcel.Run &quot;Net_Zero&quot;
  
  ObjExcel.application.quit ' &lt;--- error here
  
  Set ObjWB = Nothing
  
  Set ObjExcel = Nothing
  </code></pre>
  <p><a href="https://i.stack.imgur.com/jU0n5.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jU0n5.png" alt="Error" /></a></p>
  <p>Getting error on the BOLD Part
  Can anyone please suggest. tried everything to fix this.</p>