title: Link columns from two different workbooks
body: <p>I'm trying to link data entered in Workbook 1 Sheet 2 Columns B:J to Workbook 2 sheet 1 Columns B:J. They're both on the same network and I have basic code to link the individual cells, but it's difficult to make changes to the Master log (workbook 1) without messing up data entered on workbook 2.</p>
  
  <p>This is the code I'm trying to use but I get an error saying I don't have a source at <code>Sub foo2()</code> but I honestly have no idea what that means or even does. I just got this code from another post and am trying to get it to work. I changed the names here but I know what to enter for the path. I honestly don't even know if this is the right code for what I am trying to acheive. </p>
  
  <pre><code>Sub foo2()
  Dim x As Workbook
  Dim y As Workbook
  On Error GoTo Errorcatch
  
  '## Open both workbooks first:
  Set x = Workbooks.Open(" S:\Blah\Blah FRC\Blah\Workbook 1 ")
  Set y = Workbooks.Open(" S:\Blah\Blah FRC\Blah\Workbook 2 ")
  
  'Now, transfer values from x to y:
  y.Sheets("1").Range("B2:2000").Value = x.Sheets("1").Range("B2:B2000")
  
  'Close x:
  x.Close
  
  End Sub
  
  Exit Sub
  
  Errorcatch:
   MsgBox Err.Description
  </code></pre>