title: Run Time Error 5 - Invalid Procedure Call or Argument
body: <p>I need help with this macro.  Every time I run it, I get the error below.  I thought it was a simple macro that I could have anybody on my team use to make it take a less time than they were taking to manually create this PivotTable every time they ran the report.  However, it's not working.  Please see error below and advise.  I emboldened and italicized the error.</p>
  
  <p><img src="https://i.stack.imgur.com/cqmPhm.jpg" alt="Error"></p>
  
  <pre><code>Sub LEDOTTR()
  '
  ' LEDOTTR Macro
  '
  
  '
      Range("A87").Select
      Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
      ***ActiveWorkbook.PivotCaches.Create(SourceType:=xlDatabase, SourceData:= _
          "Sheet1!R87C1:R8214C25", Version:=xlPivotTableVersion14).CreatePivotTable _
          TableDestination:="LED OTTR!R1C1", TableName:="PivotTable6", _
          DefaultVersion:=xlPivotTableVersion14***
      Sheets("LED OTTR").Select
      Cells(1, 1).Select
      With ActiveSheet.PivotTables("PivotTable6").PivotFields("LED")
          .Orientation = xlPageField
          .Position = 1
      End With
      With ActiveSheet.PivotTables("PivotTable6").PivotFields("Hierarchy name")
          .Orientation = xlRowField
          .Position = 1
      End With
      ActiveSheet.PivotTables("PivotTable6").PivotFields("LED").CurrentPage = "(All)"
      With ActiveSheet.PivotTables("PivotTable6").PivotFields("LED")
          .PivotItems("LED Marine").Visible = False
          .PivotItems("LL48 Linear LED").Visible = False
          .PivotItems("Other").Visible = False
      End With
      ActiveSheet.PivotTables("PivotTable6").PivotFields("LED"). _
          EnableMultiplePageItems = True
      ActiveSheet.PivotTables("PivotTable6").AddDataField ActiveSheet.PivotTables( _
          "PivotTable6").PivotFields("   Late " &amp; Chr(10) &amp; "Indicator"), "Sum of    Late " &amp; Chr(10) &amp; "Indicator", _
          xlSum
      ActiveSheet.PivotTables("PivotTable6").AddDataField ActiveSheet.PivotTables( _
          "PivotTable6").PivotFields("Early /Ontime" &amp; Chr(10) &amp; "   Indicator"), _
          "Sum of Early /Ontime" &amp; Chr(10) &amp; "   Indicator", xlSum
  End Sub
  </code></pre>