title: Excel VBA - PivotTable Filter Runtime Error '1004' PivotItems
body: <p>I have the following code, which opens an excel file, selects the sheet and runs a macro - I have then managed to make it remove the filter for Date, but I am then having trouble getting it to filter to <code>"01/07/2013"</code></p>
  
  <pre><code>Sub Data()
  
  Dim oExcel As Excel.Application
  Dim oWB As Workbook
  Dim oSheets As Sheets
  Dim oPi As PivotItem
  Set oExcel = New Excel.Application
  oExcel.Workbooks.Open ("\\A79APBRSFACTD\MDSS\FactivityServer\FactShar\OEE_Daily2.xls")
  oExcel.Visible = True
  Set oExcel = Excel.Application
  Set oWB = oExcel.Workbooks("OEE_Daily2.xls")
  
  oWB.Sheets("OEE Pivot Daily").Select
  oExcel.Run ("Update_OEE_Daily")
  oWB.Sheets("OEE Pivot Daily").Range("B3").Select
  
  With oWB.Sheets("OEE Pivot Daily").PivotTables("PivotTable2").PivotFields("Date")
      .ClearAllFilters
      .PivotItems("01/07/2013").Visible = True
  End With
  
  Set oExcel = Nothing
  Set oWB = Nothing
  
  End Sub
  </code></pre>
  
  <p>I receive the following error message <code>Run-time error '1004': Unable to get the PivotItems property of the PivotField class</code></p>
  
  <p>The date <code>"01/07/2013"</code> is available in the source data of the PivotTable, and I am able to select it manually, but not automatically.</p>
  
  <p>This is baffling me, as I only need it to show the one date.</p>