Hello All,
I am trying to use VBA to Import a CSV file into my excel book then Auto Update my Pivot Tables. So far this works Great. But I have one question. I have 2 Pivot tables that are date sensative. IE Isses Over 30 days old, Issues over 20 days old. Each time I refresh the Pivots I have to manualy uncheck the Display of Issues that are within these specs. Is there a VBA way to tell Excel not to show issues within these specs on refresh. I have included my code just for reference...

Public Sub UpdateReport()

'runs the query when Update button is clicked

Call ClearCells 'Clears the Ticket Data
Call ImportCSV

End Sub

Public Sub ClearCells()

Dim ClearRange As Range

Set ClearRange = Sheet9.Range("A1:R1000")

ClearRange.ClearContents


End Sub
Public Sub ImportCSV()


With Sheet9.QueryTables.Add( _
Connection:="TEXT;C:\Case Reports\WIP CSV's\report.csv", _
Destination:=Sheet9.Range("A1"))
.RefreshStyle = xlInsertDeleteCells
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileCommaDelimiter = True
.Refresh BackgroundQuery:=False
End With

Sheet1.PivotTables("ByGroup").RefreshTable
Sheet2.PivotTables("ByType").RefreshTable
Sheet3.PivotTables("ByBase").RefreshTable
Sheet4.PivotTables("BasebyMachine").RefreshTable
Sheet5.PivotTables("BlueScreen").RefreshTable
Sheet6.PivotTables("Over20").RefreshTable
Sheet7.PivotTables("Over30").RefreshTable


End Sub

Thanks