title: Getting information from a closed excel workbook using VBA
body: <p>I am trying to extract information from a closed workbook using excel VBA, more specifically, the sum of a range of numbers in the closed excel workbook into my current excel workbook. </p>
  
  <p>I have tried the following codes below:<br>
  I want to find the sum of values from Z8 to the last Z cell in the column. </p>
  
  <pre><code>Range("D4").Formula = "Sum('I:\Outgoing\Money Outgoing\'!$Z8:$Z)"
  </code></pre>
  
  <pre><code>Set wkbk = Workbooks.Open("I:\Outgoing\Money Outgoing.xlsx\")
  Range("Z7").Select
  ActiveCell.FormulaR1C1 = "=SUM(Z8:Z10000)"
  Range("D4").Value = GetInfoFromClosedFile(a, f, d, "Z6")
  
  </code></pre>
  
  <p>I do not wish to open the closed workbook
  The excel file is Money Outgoing.xlsx
  There is only 1 tab in the file. Tab name is Layout 1</p>