PC Review


Reply
Thread Tools Rate Thread

2007 PivotTable Type Mismatch for records more than 65536

 
 
RahmReza
Guest
Posts: n/a
 
      16th Jun 2008
Hi,
I'm new in this discussion group and will appreciate if someone can help me
in finding a workaround with the problem having with creating pivottable in
excel 2007. I have the following code and get Type Mismatch error at line
"Set PivC...". This pivottable is based off 200,000 records in a worksheet
called "Data". I can maually create the pivottable without any error message.
I have found that the error message is generated when I use data records of
more than 65536. Upto 65536 records, code runs fine. Has anyone run in to
problem like this? Will really appreciate your help. Thanks.

Sub CreateSpendPivotTable()
'
' CreateSpendPivotTable Macro
'

Dim wB As Workbook
Dim PivC As PivotCache
Dim PivT As PivotTable

Application.DisplayAlerts = False
Worksheets("Data").Select

Set PivC = ActiveWorkbook.PivotCaches.Create _
(xlDatabase, Range("A1").CurrentRegion)
Sheets("%Spend Matching").Select
Set PivT = PivC.CreatePivotTable _
(TableDestination:=Worksheets("%Spend Matching").Range("B2"), _
TableName:="PivotTable1")

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pivot table has source data has exceeded 65536 records type misma Epidemic Microsoft Excel Programming 7 26th Apr 2010 12:59 PM
PivotTable: Type Mismatch JAT Microsoft Access VBA Modules 0 17th Apr 2010 06:02 PM
Export more than 65536 records from ADP to excel 2007 Tore Microsoft Access ADP SQL Server 12 3rd Dec 2008 10:11 AM
Pivot Table Type Mismatch when More than 65536 rows RahmReza Microsoft Excel Programming 1 17th Oct 2008 09:33 PM
Type Mismatch when creating a pivottable macro MikeC Microsoft Excel Programming 1 7th Sep 2004 09:35 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:45 PM.