Hi,
I have no idea about how VBA runs and I don't know the language - I succesfully wrote a script last week but this week I have another and I can't even get past the first obstacle.
I have a spreadsheet with three sheets, one of which is called "Demand Analysis". It has about a dozen pivot tables referring to data on a sheet called "Raw Data" - the first thing I want to do is clear all filters on these pivot tables (does that make sense?) and I recorded a macro to see if I could use that as a basis:
Sub Macro1()
'
' Macro1 Macro
'
'
'Get sheet 2 - this is a bit hard wired unfortunately
Sheets("Demand Analysis").Select
ActiveSheet.PivotTables("DemandPivot").PivotFields("Resource Unit"). _
CurrentPage = "(All)"
ActiveSheet.PivotTables("DemandPivot").PivotFields("Demand Status"). _
CurrentPage = "(All)"
End Sub
I get a 1004: error 'Application defined or Object-defined error' on the line in bold. I have looked in forums across the web and I haven't a clue why this is failing and what I can do to fix it.
Can anybody help please?
Bookmarks