title: copying active sheet into another workbook: Copy Method of Range class failed
body: <p>I want my code to copy the entire worksheet(SOURCE) and paste it into some other worksheet(TARGET) under other workbook(WHERE_I_WANNA_PASTE_IT) and save it. </p>
  
  <p>I am getting this error: </p>
  
  <blockquote>
    <p>Run=-time error '1004': Copy Method of Range class failed</p>
  </blockquote>
  
  <p>on this line:</p>
  
  <blockquote>
  <pre><code>CurrentSheet.Cells.Copy Destination:=oSheet.cells 
  </code></pre>
  </blockquote>
  
  <p>The code:</p>
  
  <pre><code>Public Const path1 As String = "C:\Where_I_WANNA_PASTE_IT.xlsb"
  Dim oExcel As Object
  Dim oBook As Object
  Dim oSheet As Object
  Dim CurrentSheet As Object
  
  Sub copyNpaste
  
  Set CurrentSheet = ActiveSheet
  Set oExcel = CreateObject("Excel.Application")
  Set oBook = oExcel.Workbooks.Open(path1)
  Set oSheet = oBook.Worksheets("TARGET")
  
  'Deleting what's on "TARGET" first
  oSheet.cells.delete
  
  'This is where the Error happens.
  CurrentSheet.Cells.Copy _
  Destination:=oSheet.Cells
  
  oBook.Save
  oBook.Close
  
  Set oExcel = Nothing
  Set oBook = Nothing
  Set oSheet = Nothing
  Set CurrentSheet = Nothing
  
  End Sub
  </code></pre>