Sub CHART_DATERANGE_INSPECTIONS()
   ActiveSheet.PivotTables("DATA").PivotFields("DATE").ClearAllFilters
    ActiveSheet.PivotTables("DATA").PivotFields("DATE").PivotFilters.Add Type:=xlDateBetween, Value1:=Sheets("PIVOTDATA").Range("C5").Value, Value2:=Sheets("PIVOTDATA").Range("C7").Value
'    ActiveSheet.PivotTables("DATA").PivotFields("DATE").PivotFilters.Add Type:=xlDateBetween, Value1:="4/03/2013", Value2:="20/03/2013"
End Sub
I am trying to set a cell value for the start and end date (C5 & C&) and have a macro filter the data in the chart by a Between Dates filter.

If i record the task, and change the dates to the sheet ranges, i get no filtering.

How can i accomplish this?