title: How can I close the workbook when Application.run is completed in VBA?
body: <pre><code>Sub openWorkBook()
  Workbooks.Open Filename:="C:\Users\Desktop\data\" &amp; Cells(2, 1).Value
  Application.Run "RefreshAllWorkbooks"
  End Sub
  </code></pre>
  
  <p>My code is shown as above. I open another workbook and use Application.Run "RefreshAllWorkbooks" to refresh all of the formula in the Excel workbook. It takes about 3 minutes to finish formula calculation (Actually it draws data from Bloomberg). And I want the workbook to close after finishing refreshing all data. How to improve the VBA codes above?</p>