PC Review


Reply
Thread Tools Rate Thread

create pivot table code not working in Access 2002

 
 
Chris_n_Mihaela
Guest
Posts: n/a
 
      27th May 2004
Created macro in Excel, moved to access, worked fine in
Office 97, but crashes in Access 2002.

Original Excel Code:
..ActiveWorkbook.PivotCaches.Add(SourceType.xlDatabase,
SourceData:= _
"'Comparison on Local'!
R1C1:R15000C50").CreatePivotTable _
TableDestination:="", TableName:="PivotTable1",
DefaultVersion:= _
xlPivotTableVersion10

Modified Access Code:
..Application.ActiveWorkbook.PivotCaches.Add
(SourceType:=.Application.xlDatabase, SourceData:= _
"'Comparison on Local'!
R1C1:R15000C50").CreatePivotTable _
TableDestination:="", TableName:="PivotTable1",
DefaultVersion:= _
xlPivotTableVersion10

I think the problem is that my "Activeworkbook" object
doesn't have the PivotCaches object.

Any suggestions on how to:

1) preferrably just edit excel VB and paste into Access
2002 so it creates pivot table automatically?

2) alternatively, custom code to create pivot table and/or
pivot cache in an existing worsheet?

Thanks!

 
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 refresh in VBA code not working Carlos Microsoft Excel Programming 0 8th Jan 2009 05:35 PM
vba code to create pivot table + group fields lechu Microsoft Excel Programming 0 5th Sep 2006 09:48 PM
Re: Create Pivot Table Using Code Debra Dalgleish Microsoft Excel Discussion 0 31st Aug 2005 10:17 PM
Create a pivot table via VBA code =?Utf-8?B?TUNocmlzdA==?= Microsoft Excel Programming 4 11th Jul 2005 07:47 PM
Pivot table help Access 2002 Clyde Lomax Microsoft Access 1 20th Jul 2003 12:05 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:30 AM.