Consulting

Results 1 to 2 of 2

Thread: Pivot Table Settings

  1. #1
    VBAX Regular
    Joined
    Jul 2007
    Posts
    30
    Location

    Pivot Table Settings

    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

  2. #2
    VBAX Regular
    Joined
    Sep 2007
    Location
    Singapore
    Posts
    63
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •