Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default 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
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
Refreshing 2003 Pivot Table w/ Excel 2007 FloydN Excel Discussion (Misc queries) 0 March 16th 09 02:11 PM
how do I refresh in excel 2007 a 2003 pivot table? tavi Excel Discussion (Misc queries) 0 June 18th 08 11:15 AM
grouping error in Excel 2003/2007 Pivot table connect to offline c KT[_2_] Excel Worksheet Functions 0 June 4th 08 04:41 AM
Excel 2007 pivot chart/table copying vs Excel 2003 xpdnt1 Charts and Charting in Excel 0 May 6th 08 07:51 PM
Excel 2007 pivot table formats that work with 2003 Steven Excel Discussion (Misc queries) 1 March 22nd 08 12:44 AM


All times are GMT +1. The time now is 12:32 AM.

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"