title: VBA - Copy variable range from one sheet to another
body: <p>I would like to copy data from a sheet "Inv_Headers", Column C, from 2nd row until the last row to a sheet "Customers", Column U, from 4th row.</p>
  
  <pre><code>Private Sub Invoice_C()
      Dim ws As Worksheet, ws1 As Worksheet
      Dim lastrow As Long
  
      Set ws = Worksheets("Inv_Headers")
      Set ws2 = Worksheets("CUSTOMERS")
  
  
          lastrow = ws.Cells(Rows.Count, 3).End(xlUp).Row ' last row in column C
          ws.Range("C2:C" &amp; lastrow).Copy
          ws1.Range("U4").PasteSpecial xlPasteValues
          ws1.Activate
  
  
  End Sub
  </code></pre>
  
  <p>My code is giving me error msg '91' - Object variable or With block variable not set. But the code should work without With statement as well, shouldn't it?</p>
  
  <p>Could I ask you for your advices, please?</p>
  
  <p>Many thanks!</p>