From a Debra Dalgleish post:
You could use the Worksheet_Calculate event to switch the selection to
the first item in the page field list. Place the following code on the
worksheet module:
'==========================
Private Sub Worksheet_Calculate()
'if (All) is selected from a page field
'the first item is selected instead
Dim pt As PivotTable
Dim pf As PivotField
Set pt = ActiveSheet.PivotTables(1)
For Each pf In pt.PageFields
If pf.CurrentPage = "(All)" Then
pf.CurrentPage = pf.PivotItems(1).Name
End If
Next pf
Application.EnableEvents = True
End Sub
'===============================
nockam wrote:
I am trying to hide a "Page" option on a pivot table. I need to hide \
disable the "(all)" option and create another one with an accurate
calculation. I can handle making the other one but I cannot seem to
find a way to hide the "(all)" option. If anyone can provide any help
it would be greatly appreciated. I alredy tried making another "(all)"
section but it just lists 2 all sections on the page view drop down on
the pivot table. Thanks,
Garrett
--
nockam
------------------------------------------------------------------------
nockam's Profile: http://www.excelforum.com/member.php...o&userid=15744
View this thread: http://www.excelforum.com/showthread...hreadid=387229
--
Dave Peterson