LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.misc
Debra Dalgleish
 
Posts: n/a
Default Don't want the "All" option in the Drop Page Field of a pivottabl

You can't suppress the "(All)" option in the page field. 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.


Vincerix wrote:
I have done a report using a pivot table to show some results per segment.
I have to put the Segment field in the Drop Page Field area.

My problem is this list of segment contains sub-segments and Total Segments
too, i.e. I don't want to have the option "All", as the users have to select
absolutely one item from the segment list.
(this default "All" shows meaningless figures in the Pivot Table!)

I didn't see any option allowing me to hide this "all" item in the drop list.
I think I have seen once that it was possible using VBA code, but I can't
find out how.

Notes: This report has several Drop Page Fields, but not all of them need to
have this "All" option hidden.

Your help will be appreciated.

PS: Version of Excel: 2003 SP1



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Order of Pivot Drop-Down (Page Field) [email protected] Excel Discussion (Misc queries) 0 March 31st 06 02:01 AM
pivot table mutliple choice in page section Mr Curious Excel Discussion (Misc queries) 0 November 22nd 05 08:57 AM
Pivot table page field switch to (all) if my criteria is not avail Angus Excel Discussion (Misc queries) 0 July 30th 05 05:06 AM
Multiple Pivot Tables with single Page Field cscribner Excel Discussion (Misc queries) 1 May 26th 05 12:26 AM
Problems with Pivot Table Field Sorting in Excel 2002 Phoenix71555 Excel Discussion (Misc queries) 1 February 27th 05 11:25 PM


All times are GMT +1. The time now is 06:49 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"