Pivot Table Page Field

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

Does anyone know if I can interact with the (All) selection of a pivot table
page field? I would like to either take it out or change it's caption.

Neil
 
You can't suppress the "All" option in the page field, or change its
caption. With programming, you could select another item if the user
selects "All".

For example:
'========================
Private Sub Worksheet_Change(ByVal Target As Range)
Dim pt As PivotTable
Dim pf As PivotField
Set pt = Me.PivotTables(1)
Set pf = pt.PivotFields("Region")

With pf
If .CurrentPage = "(All)" Then
.CurrentPage = .PivotItems(1).Name
End If
End With
End Sub
'============================

This code is stored on the worksheet's code module --
Right-click the sheet tab, and choose View Code
Paste the code where the cursor is flashing.
 
Hi Debra,

I suspected you couldn't actually mess about with the (All) field, but this
will be really helpful,

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top