title: Issue with vba creating a pivot table, is this an excel version issue?
body: <p>Quick one, got the following code which goes and creates a pivot table based on a data collection "Data".  I run this on the PC that it was created on which runs Excel 2013 without an issue however when I run it on Excel 2007 or Excel 2010 it throws up an Invalid Procedure Call or Arguement error on the line after Range("A1").Select</p>
  
  <p>Is this an excel version error because written in Excel 2013 but used on 2007 or 2010?</p>
  
  <pre><code>    Sheets("Pivot").Select
      Range("A1").Select
      ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
          "Data", Version:=xlPivotTableVersion15).CreatePivotTable TableDestination:= _
          "Pivot!R1C1", TableName:="PivotTable4", DefaultVersion:= _
          xlPivotTableVersion15
      Sheets("Pivot").Select
      Cells(1, 1).Select
      With ActiveSheet.PivotTables("PivotTable4").PivotFields("Date Only")
          .Orientation = xlRowField
          .Position = 1
      End With
      With ActiveSheet.PivotTables("PivotTable4").PivotFields("Species")
          .Orientation = xlColumnField
          .Position = 1
      End With
      ActiveSheet.PivotTables("PivotTable4").AddDataField ActiveSheet.PivotTables( _
          "PivotTable4").PivotFields("Number"), "Sum of Number", xlSum
  </code></pre>
  
  <p>If it is a version issue which I think it might be as people have used DefaultVersion:=xlPivotTableVersion14 and 12 does anyone know which version would work on Excel 2007 or Excel 2010? I am assuming if I input correct version for 2007 it would be backwards compatible with 2010 and 2013 etc...?</p>
  
  <p>Cheers in advance
  Will</p>