Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Change SourceData in Excel PivotTable via VBA

I am updating a number of files that all require the same pivot table
so I am copying a "standard" pivot table (actually, the whole workshee
the pivot table is in) from one file and pasting it to each file. A
this point, all I want to do is update the SourceData to reflect
named region ("RawData") in each file.

The following gives me an error:

ActiveSheet.PivotTableWizard SourceType:=xlDatabase, _
SourceData:="RawData"
ActiveSheet.PivotTables("RT Data").PivotCache.Refresh

The pivot table is called "RT Data", so that is not the error. Doe
anyone have any suggestions

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default Change SourceData in Excel PivotTable via VBA

What error do you get, and which line is highlighted?

CarlsonClan < wrote:
I am updating a number of files that all require the same pivot table,
so I am copying a "standard" pivot table (actually, the whole worksheet
the pivot table is in) from one file and pasting it to each file. At
this point, all I want to do is update the SourceData to reflect a
named region ("RawData") in each file.

The following gives me an error:

ActiveSheet.PivotTableWizard SourceType:=xlDatabase, _
SourceData:="RawData"
ActiveSheet.PivotTables("RT Data").PivotCache.Refresh

The pivot table is called "RT Data", so that is not the error. Does
anyone have any suggestions?


--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html

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
Dynamic sourcedata when copying chart within sheet [email protected] Charts and Charting in Excel 3 June 11th 08 03:37 PM
Excel/chart/sourcedata - should let me set the left or right axis belohls Charts and Charting in Excel 1 June 19th 06 10:43 PM
MS Excel 2000 - Change PivotTable DataSource (Access2000 database) Scott Excel Discussion (Misc queries) 0 May 30th 06 03:33 PM
Setting up a SourceData:= in VB Emmanuel[_2_] Excel Programming 1 January 22nd 04 08:15 PM
Dynamic Array as pivot table SourceData..? Robert Stober Excel Programming 0 October 3rd 03 05:36 PM


All times are GMT +1. The time now is 11:12 PM.

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"