Hi
I am a novice at this... have recorded macros and used them but come stuck.
Using Office 2007 (Windows 7 Pro)
Have Data on Sheet one from SQL via ODBC, works well. (Sales Data)
Have a Pivot Table called PivotTable2
Column B has the shipped date and I want to create buttons so user can filter by last month, last week, this week etc.
Recorded a macro and get "run-time error 1004 unable to get the pivotfields property of the pivot table class"
The query is;-
Sub Macro1()
'
' Macro1 Macro
'
'
ActiveSheet.PivotTables("PivotTable2").PivotFields("Shipment Date"). _
PivotFilters.Add Type:=xlDateLastWeek
End Sub
How can I get this to run. I also want same for last week, moth etc.
Thanks in advance
arun soni
Bookmarks