I use getpivotdata to return information onto another sheet.
I was wondering, is it possible to use vba in a comment to show the pivot table settings:
ie what selection (filters) the fields are set to:
Thanks
I use getpivotdata to return information onto another sheet.
I was wondering, is it possible to use vba in a comment to show the pivot table settings:
ie what selection (filters) the fields are set to:
Thanks
I'm using the below to return the current field value. I'm not sure if it's applicable your case but here goes:
[vba]
Dim TargetPage as PivotField
Dim SelectedValue As String
Set TargetPage = ActiveSheet.PivotTables("PivotMain").PivotFields("Quantity")
SelectedValue = TargetPage.CurrentPage.Value[/vba]
The pivot table that I use is named PivotMain and has a page field named Quantity.