Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default PT.Format (xlTable2) removes data from pivot table?

Haha! I think I found the question but I need help with the answer.

The code snippet below is part of an advanced filter that I'm putting into a
pivot table.

Code:
'Set up PT data fields
With PT.PivotFields("CallStatus")
.Orientation = xlDataField
.Function = xlCount
.Position = 1
End With

PT.ManualUpdate = False 'calculates and draws the pivot table
PT.ManualUpdate = True 'turns off PT calculation

'Change RecvdDate from daily to quarterly in Pivot Table
PT.PivotFields("RecvdDate").LabelRange.Group Start:=True, _
End:=True, Periods:= _
Array(False, False, False, False, True, True, False)

'Row and column headings
PT.AddFields RowFields:=Array("Category", "Quarters", "RecvdDate"),
ColumnFields:="CallStatus"

PT.ManualUpdate = False
PT.ManualUpdate = True

WSN.Columns.AutoFit
PT.Format (xlTable2)



I discovered that Code:
PT.Format (xlTable2)
removes the data from the pivot table that was placed by Code:
..Orientation = xlDataField
, but I haven't a clue as to why.

If I comment out Code:
'PT.Format (xlTable2)
this part the data in the Pivot table stays.

Ideas anyone?

Thanks,

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
In Office 07, how do I format my pivot table data? Razzberryzing Excel Worksheet Functions 1 September 7th 09 01:22 AM
Pivot Table Format from Source Data tommcbrny Excel Discussion (Misc queries) 0 February 6th 09 08:12 PM
Format Extracted Data from Pivot Table Martincito23 Excel Discussion (Misc queries) 2 October 26th 07 01:01 PM
Pivot Table format changes when data is refreshed Bendinblues Excel Discussion (Misc queries) 8 October 22nd 07 02:45 PM
Pivot Table hiding row removes from row ! Fullam Excel Discussion (Misc queries) 1 April 15th 06 12:44 AM


All times are GMT +1. The time now is 10:41 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"