title: Copy multiple ranges and paste
body: <p>EDIT: I forgot to put all the code.</p>
  
  <p>I'm trying to copy 2 ranges and paste them to a different sheet but i get this error:</p>
  
  <blockquote>
    <p>Object variable or With block variable not set</p>
  </blockquote>
  
  <p><strong>Code:</strong></p>
  
  <pre><code>Sub Test()
  
      Dim R1 As Range
      Dim R2 As Range
      Dim mRange As Range
      Dim C As Range
      Dim LastRow As Integer
  
      LastRow = Sheets("Errors").Range("A" &amp; Rows.Count).End(xlUp).Row
  
      Set R1 = Range("D5:N5")
      Set R2 = Range("B8")
      Set mRange = Union(R1, R2)
  
      For Each C In mRange.Areas
  
          C.Copy
          Worksheets("Errors").Range("A" &amp; LastRow + 1).Paste
  
      Next C
  
  End Sub
  </code></pre>
  
  <p>Thanks in advance !</p>