title: vba pivot does not refresh after adding new lines
body: <p>With the help of VBA I am able to create pivot table. But when new lines are added in sheet and I refresh the pivot table with <code>wksSource1.PivotTables(1).RefreshTable</code>, it is not updating the pivot table. </p>
  
  <pre><code>Dim PCache As PivotCache
  Dim PTable As PivotTable
  Dim PRange As Range
  Dim lastrowv As Long
  Dim lastcolv As Long
  
  lastrowv = wksSource.Cells(Rows.Count, 3).End(xlUp).Row
  lastcolv = wksSource.Cells(5, Columns.Count).End(xlToLeft).Column
  Set PRange = wksSource.Cells(5, 1).Resize(lastrowv - 4, lastcolv)
  
      ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
          PRange, Version:=xlPivotTableVersion14).CreatePivotTable _
          TableDestination:=wksSource1.Cells(1, 1), TableName:="PivotTable14", _
          DefaultVersion:=xlPivotTableVersion14
      wksSource1.Select
      Cells(1, 1).Select
      With ActiveSheet.PivotTables("PivotTable14").PivotFields("Term - Phases")
          .Orientation = xlRowField
          .Position = 1
      End With
      With ActiveSheet.PivotTables("PivotTable14").PivotFields("Status")
          .Orientation = xlColumnField
          .Position = 1
      End With
  
      ActiveSheet.PivotTables("PivotTable14").AddDataField ActiveSheet.PivotTables( _
          "PivotTable14").PivotFields("Steps/ Activities"), "Count of Steps/ Activities" _
          , xlCount
  </code></pre>