Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
FA FA is offline
external usenet poster
 
Posts: 18
Default Data validation to control a pivot table field

I have the following VBA. I use it to change a Pivot table with a data
validation cell. The problem that I have is that when the pivot table should
show "All" it will overwrite the latest selection.

How can I change that in order to make it select "All" when required?

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Cells.Count 1 Then Exit Sub
If Intersect(Target, Me.Range("k1")) Is Nothing Then Exit Sub

Application.EnableEvents = False
Worksheets("Sales").PivotTables("Pivottable1") _
.PageFields("Alpha Name --------------------").CurrentPage =
Target.Value
Application.EnableEvents = True

End Sub
Reply
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
Pivot table field data Steve 51 Excel Discussion (Misc queries) 1 February 9th 09 08:35 PM
use field data from 1 pivot table in another? fdibbins Excel Worksheet Functions 1 November 6th 06 06:28 PM
Pivot Table Data field Dan McCollick Excel Programming 2 April 10th 06 06:09 PM
Pivot Table Field Data Annie Excel Worksheet Functions 4 January 9th 06 03:40 PM
How do you control the font size of the data validation field? jeffwamp Excel Discussion (Misc queries) 1 January 6th 06 01:08 AM


All times are GMT +1. The time now is 05:08 PM.

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

About Us

"It's about Microsoft Excel"