title: VBA create pivot table for xlsx with more than 69,000 rows
body: <p>I am new to VBA programming and currently what to create pivot tables for several xlsx/xls files. Some files have more than 70,000 instances.</p>
  
  <pre><code>'Create Pivot Table for PAX Traffic for each subclasses
  
  Range("A1").Select
  Range(Selection, Selection.End(xlDown)).Select
  Range(Selection, Selection.End(xlToRight)).Select
  
  Dim SourceRange As Range
  Set SourceRange = Selection
  Application.CutCopyMode = False
  
      Sheets.Add
      ActiveWorkbook.PivotCaches.Create( _
      SourceType:=xlDatabase, _
      SourceData:=SourceRange, _
      Version:=xlPivotTableVersion11).CreatePivotTable _
      TableDestination:="Sheet1!R3C1", TableName:="PivotTable1" _
          , DefaultVersion:=xlPivotTableVersion11
  </code></pre>
  
  <p>It works well until those xlsx file with more than 70,000 instances.</p>
  
  <p>Thanks for your gentle help.</p>