title: First Line of Code: User-defined type not defined
body: <p>I am a very new user and am trying to open up three workbooks and copy the same cell range of the three books to three different ranges in a fourth book. </p>
  
  <p>I have done a good amount of troubleshooting but I cannot find anything to help fix this. </p>
  
  <p>The problem points to Sub WeeklyLeagues()</p>
  
  <pre><code>Option Explicit
  
      Sub WeeklyLeagues()
  
      Dim x_both As workbook_both
      Dim x_sf As workbook_sf
      Dim x_mf As workbook_mf
      Dim y As workbook_final
  
      Set x_both = Workbooks.Open("Sheet1 Path")
      Set x_sf = Workbooks.Open("Sheet2 Path")
      Set x_sf = Workbooks.Open("Sheet3 Path")
      Set y = Workbooks.Open("Sheet4 Path")
  
      x_both.Sheets("Request 4 Rank 1").Range("A2:E18").Copy
      y.Sheets("Source").Range("M2:Q18").PasteSpecial
  
      x_sf.Sheets("Request 4 Rank 1").Range("A2:E18").Copy
      y.Sheets("Source").Range("A2:E18").PasteSpecial
  
      x_mf.Sheets("Request 4 Rank 1").Range("A2:E18").Copy
      y.Sheets("Source").Range("G2:k18").PasteSpecial
  
      'Close x:
      x_both.Close
      x_sf.Close
      x_mf.Close
  
      End Sub
  </code></pre>