title: How can I use VBScript to effectively refresh the external data of several Excel spreadsheets?
body: <p>I have a macro in one XLSM workbook's module that refreshes all the external data, then saves and closes that workbook.</p>
  
  <pre><code>ActiveWorkbook.RefreshAll
  ActiveWorkbook.Save
  ActiveWorkbook.Close
  Application.Quit
  </code></pre>
  
  <p>I use a VBScript file to run that macro as part of a scheduled task</p>
  
  <pre><code>objExcel.Workbooks.Open(fname)
  objExcel.Visible = True
  On error resume next
  objExcel.Run "RefreshAllData"
  </code></pre>
  
  <p>Question: How can I reuse the existing macro in the existing workbook to refresh all the data of multiple other workbooks? (ie. I'm looking for the necessary modifications to the VBScript file, I want to minimise changes to the macro itself. The filenames will be contained in the VBScript file) TIA.</p>