Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Pivot Table - Excel 2003 Vs 2007
Please see below the code I am using to change a Pivot Table Field value by
typing the value required in another sheet - Cell. I am not an expert in coding, and this code originally got from this group only. The problem is that when I convert the 2003 format to 2007 this code is not working where as it works perfect in 2003. In 2007 format gives error and focus to the line "SubNum.CurrentPage = Pi.Value". Could you pls help to solve it Thanks and regards - Santhosh Mani ---------------------- Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) Dim SubNum As PivotField If Target.Count 1 Then Exit Sub If IsEmpty(Target.Value) Then Exit Sub If Target.Address = "$F$4" Then Worksheets("StmtData").PivotTables("PivotTable1"). PivotCache.Refresh Set SubNum = Worksheets("StmtData").PivotTables _ ("PivotTable1").PageFields( _ "SubNo") For Each Pi In SubNum.PivotItems If Pi.Value = Target.Text Then SubNum.CurrentPage = Pi.Value Exit For End If Next End If End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Refreshing 2003 Pivot Table w/ Excel 2007 | Excel Discussion (Misc queries) | |||
how do I refresh in excel 2007 a 2003 pivot table? | Excel Discussion (Misc queries) | |||
grouping error in Excel 2003/2007 Pivot table connect to offline c | Excel Worksheet Functions | |||
Excel 2007 pivot chart/table copying vs Excel 2003 | Charts and Charting in Excel | |||
Excel 2007 pivot table formats that work with 2003 | Excel Discussion (Misc queries) |