title: Copy Between Workbooks and Worksheets
body: <p>I am trying to copy a dynamic range from one workbook1 sheet1 to workbook2 sheet2. The code works but only when I have workbook1 sheet1 active, if I have workbook1 sheet2 active the code fail.</p>
  
  <p>My code is:</p>
  
  <pre><code>Sub CopyOrders()
  
  
      Dim wB1 As Worksheet
      Set wB1 = Workbooks("Master.xlsx").Worksheets("Data")
  
      Dim RngCe1 As Range
      Set RngCe1 = wB1.Cells(Rows.Count, "B").End(xlUp).Offset(0, 11)
  
      Dim RngCe2 As Range
      Set RngCe2 = wB1.Range("A1:A7000").FIND("Grand Total", LookAt:=xlPart).Offset(-1, 23)
  
      Dim NewRng As Range
      Set NewRng = Range(RngCe1.Address &amp; ":" &amp; RngCe2.Address)
  
      Dim wB2 As Worksheet
      Set wB2 = Workbooks("Report.xlsx").Worksheets("Orders")
  
      Dim DesRng As Range
      Set DesRng = wB2.Cells(Rows.Count, "A").End(xlUp).Offset(1, 0).Resize(, 12)
  
      NewRng.Copy
      DesRng.PasteSpecial xlPasteValues
  
  
  End Sub
  </code></pre>