Hi,
I have several pivot tables in an excel spreadsheet which are linked to powerpoint to produce customer reports.
Currently I have to go onto each pivot table and select the customer name i require to update every pivot.
I want to tyoe in the customer name in one place and then run a macro to update each pivottable.
I am very close but not quite there.
This code puts the words 'mycustomer' as the filter for the pivot table whereas what I am looking for is the contents of the cell in B5 to be the filter.
Sub Update_pivots()
Dim MyCustomer As String
Sheets("Instructions").Select
MyCustomer = Range("B5").Value
Sheets("Pivot").PivotTables("PivotTable3").PivotFields("Customer Name"). _
CurrentPage = ("MyCustomer")
End Sub
If I use CurrentPage = MyCustomer I get the error message Run Time error 5 - Invalid procedure call or argument.
Any help gratefull recieved. Thanks