title: VBA - Copy and Paste Table Row to Another Table
body: <p>I am very new to VBA and I am trying to solve what I think should be a very simple problem (I have a Java/J2EE background)... I am looping through a table and want to copy rows to a table on another worksheet based on some conditional statements. See code below.</p>
  
  <pre><code>Sub closeActionItems()
      Dim i, iLastRow As Integer
      Dim date1 As Date
      Dim oLastRow As ListRow
  
      date1 = Date
      iLastRow = ActiveSheet.ListObjects("Open_Items").ListRows.Count
  
      For i = 6 To iLastRow
          If Cells(i, 7).Value &lt;= date1 And Cells(i, 7).Value &lt;&gt; vbNullString Then
              Rows(i).Copy
              Set oLastRow = Worksheets("Closed").ListObject("Closed_Items").ListRows.Add
              'Paste into new row
  
              Application.CutCopyMode = False
              Rows(i).EntireRow.Delete
          End If
      Next
  End Sub
  </code></pre>
  
  <p>I have tried many different iterations but have been unable to find the correct way to copy the contents of the clipboard to the newly created row. </p>
  
  <p>Any help would be appreciated. Thanks ahead of time. </p>