title: How to Update data in an Excel File daily Without Opening it?
body: <p>I have a Financial Model in Excel with Multiple tabs which gets its data from another workbook. I need it to be updated automatically every day in the morning without opening it. I kept looking online and found a solution but it gives me an error. Can anyone help.</p>
  <p>My Approach:</p>
  <p>1 - Creating a Macro that updates the excel workbook, and here is my code:</p>
  <pre><code>Sub AutoRefresh()
      ActiveWorkbook.RefreshAll
      Call Refresh_Macro
  End Sub
  
  Private Sub Refresh_Macro()
      Application.OnTime TimeValue(&quot;15:20:00&quot;), &quot;AutoRefresh&quot;
  End Sub
  </code></pre>
  <p>2 - Created a VBS File that can run the Macro automatically to be run by Windows Scheduler, and here is the code for it</p>
  <pre><code>Set objExcel = CreateObject(&quot;Excel.Application&quot;)
  objExcel.Application.Run &quot;'C:\Test\ZZCAS_Imaging_Throughput.xlsm'!Refresh.AutoRefresh&quot;
  objExcel.DisplayAlerts = False
  ObjExcel.Application.Quit
  set objExcel = Nothing
  </code></pre>
  <p>Every time I run it to test if the update will success, it gives me an error says <strong>The remote Procedure call failed</strong></p>
  <p>Any Help?</p>