Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Pivot table field data | Excel Discussion (Misc queries) | |||
use field data from 1 pivot table in another? | Excel Worksheet Functions | |||
Pivot Table Data field | Excel Programming | |||
Pivot Table Field Data | Excel Worksheet Functions | |||
How do you control the font size of the data validation field? | Excel Discussion (Misc queries) |