title: Getting error in pasting values after last used row from one worksheet to another in vba
body: <pre><code>Workbooks("A.xlsx").Worksheets("Y").Range("A:L").Copy
  Workbooks("A.xlsx").Worksheets("Z").Activate
  last_row = Cells(Rows.Count, "A").End(xlUp).Row
  Cells(last_row + 1, 1).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, 
  SkipBlanks:=False, Transpose:=False
  </code></pre>
  
  <p>In the above code, I am getting "<strong>Runtime error 1004 Copy and paste area are not the same size, you can't paste here</strong>". Kindly help me with an updated version of the code. Thanks in advance.</p>