title: Changing Workbook Reference with VBA
body: <p>Currently, I have a workbook without VBA, that pulls the maximum value from a specific range on a few different sheets in an external workbook. In the future, I would like to be able to frequently update the source workbook, while the sheet name and cell ranges will always be the same. For example, the following are a few of my current cell formulas:</p>
  <pre><code>=MAX(ABS(IF('[Test.xlsx]Page_3'!$B$6:$B$107&lt;$B$8,'[Test.xlsx]Page_3'!$A$6:$A$107)))
  =MAX(ABS(IF('[Test.xlsx]Page_4'!$B$6:$B$107&lt;$B$8,'[Test.xlsx]Page_4'!$A$6:$A$107)))
  </code></pre>
  <p>Is there a way that I can define a sheet name, while still using these formulas in the cells? What I am envisioning is something like this:</p>
  <pre><code>Private Sub CommandButton1_Click()
  Dim path As String
  Dim wbk As Workbook
  
  path = Application.GetOpenFilename()
  Set wbk = Workbooks.Open(path)
  
  
  End Sub 
  </code></pre>
  <p>then I would be able to use that variable within the cells like this:</p>
  <pre><code>=MAX(ABS(IF('[wkb]Page_3'!$B$6:$B$107&lt;$B$8,'[wkb]Page_3'!$A$6:$A$107)))
  </code></pre>
  <p>Is something like this possible? I would like to avoid coding all of my functions within the VBA window. I am much more comfortable with the syntax of the Excel functions.</p>