title: How to create a new table out of pasted values VBA
body: <p>I try to make a table out of new range which has just been pasted (it is an extraction of old table but only part of it, not entire so it doesn't paste as a table) in the worksheet, however I got an error. It used to even create a table with this error 5 - invalid procedure or call</p>
  <pre><code>Set RngTable = ThisWorkbook.Worksheets(&quot;Sheet1&quot;).Range(&quot;A1:D5&quot;)
  LastRow = Cells(Rows.Count, &quot;A&quot;).End(xlUp).Row
  Set DestRange = Cells(LastRow + 3, &quot;A&quot;)
  
  RngTable.Copy
  DestRange.PasteSpecial xlPasteAll
  
  DestRange.CurrentRegion.Select
  
  Set newtbl = ActiveWorkbook.Sheets(&quot;Sheet1&quot;).ListObjects.Add(xlSrcRange, DestRange.CurrentRegion.Select, , xlYes)
  </code></pre>