Hi,

I have been trying to write a macro to change the page field selection of a pivot table, based on the value in a given cell (which is controlled by a combobox).

I know you can do it by calling the actual name of the field selection with this type of code:

Sub a_macro() 
     
     Sheets("pivotsheet").Select 
    ActiveSheet.PivotTables("PivotTable1").PivotFields("Customer Name"). _ 
    CurrentPage = "Customer" 
     
End Sub
However I need it to look at a cell. I have tried all sorts of things, using a string instead but I can't get it to work.

Can anyone help?

Thanks in advance.