title: Count Cols in Pivot Table VBA
body: <p>All, </p>
  
  <p>I have a pivot which varys in column width therefore I am trying to count the amount of columns in a pivot, I have the below code which errors on the line highlighted</p>
  
  <pre><code>Dim pt As PivotTable
  Set pt = ActiveSheet.PivotTables(1)
  pt.ColumnRange.Count **ERROR**
  </code></pre>
  
  <p>Please can someone advise how to best count cols in a pivot table. </p>