Hi,
I think im pretty close to getting this working im just not sure what to set my Path As.
What im attempting is to be able to filter my pivot table in the Item Code category by a chosen item number e.g. 111111, I want to just type the number in cell G9 and then that will automatically filter the pivot table to that value.
Sub Macro1()
'
' Macro1 Macro
'
Dim Path As ?????
Path = Range("G9").Value
ActiveSheet.PivotTables("PivotTable1").PivotFields( _
"[Item].[Item Code].[Item Code]").VisibleItemsList = Array( _
"[Item].[Item Code].&[Australia]&(Path)")
End Sub
I think im pretty close to getting this working im just not sure what to set my Path As.
What im attempting is to be able to filter my pivot table in the Item Code category by a chosen item number e.g. 111111, I want to just type the number in cell G9 and then that will automatically filter the pivot table to that value.
Sub Macro1()
'
' Macro1 Macro
'
Dim Path As ?????
Path = Range("G9").Value
ActiveSheet.PivotTables("PivotTable1").PivotFields( _
"[Item].[Item Code].[Item Code]").VisibleItemsList = Array( _
"[Item].[Item Code].&[Australia]&(Path)")
End Sub