title: Is there a way to clear the table (listObject) content and resizing it one column?
body: <p>I wish to reset a table (listObject) via VBA. I tried it in two ways:</p>
  <p><strong>Idea 1: Clear table content and resize the table to one column</strong></p>
  <pre><code> With ActiveWorkbook.Worksheets(&quot;Sheet1&quot;).ListObjects(&quot;tblExample&quot;)
          If Not .DataBodyRange Is Nothing Then .DataBodyRange.ClearContents
          Dim numColumns As Long: numColumns = .ListColumns.Count
          If numColumns &gt; 1 Then
                 .DataBodyRange.Offset(1).Resize(, .Columns.Count - 1).Delete 'Last statement
          End If
  End With
  </code></pre>
  <p>The problem: When evaluating the last statement I get the runtime '438' error stating something like: 'Object does not support this Property or Method.'</p>
  <p><strong>Idea 2: Delete the table and make a new one</strong></p>
  <pre><code>With ActiveWorkbook.Worksheets(&quot;Sheet1&quot;)
  If .ListObjects.Count = 1 Then
             .ListObjects(1).Delete
             .ListObjects.Add(Destination:=.Range(&quot;I1:I105&quot;)).Name = &quot;tblExample&quot;
  End If
  End With
  </code></pre>
  <p>The problem: The new table is placed at a random location (= selected cell).</p>