Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 67
Default HOW TO: PivotTable.SourceData

I've been trying to update the source data range of my pivot tables on all my
worksheets within a workbook and I've been using the following code

pt.SourceData = wsDATA.Name & "!R1C1:" &
wsDATA.Cells.SpecialCells(xlCellTypeLastCell).Addr ess(ReferenceStyle:=xlR1C1)

This works great while its on an English machine but if I change the
Regional Setting e,g, to Germany then it fails because of the xlR1C1
reference style because the returns e.g. R1C1:R4500C62 but German setting
require Z4500S62

So the question is how do I set the source data of a pivot table using the
xlR1C1 style of the machine settings since if I question mark ?pt.SourceData
I get the
xlR1C1 style. Hence if I try to use xlA1 reference style that too fails.

Any help much appreciated

ciao
KM

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 67
Default HOW TO: PivotTable.SourceData

FormulaR1C1Local I think might help

"Kevin McCartney" wrote:

I've been trying to update the source data range of my pivot tables on all my
worksheets within a workbook and I've been using the following code

pt.SourceData = wsDATA.Name & "!R1C1:" &
wsDATA.Cells.SpecialCells(xlCellTypeLastCell).Addr ess(ReferenceStyle:=xlR1C1)

This works great while its on an English machine but if I change the
Regional Setting e,g, to Germany then it fails because of the xlR1C1
reference style because the returns e.g. R1C1:R4500C62 but German setting
require Z4500S62

So the question is how do I set the source data of a pivot table using the
xlR1C1 style of the machine settings since if I question mark ?pt.SourceData
I get the
xlR1C1 style. Hence if I try to use xlA1 reference style that too fails.

Any help much appreciated

ciao
KM

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
SourceData for graph caroline Excel Programming 1 September 8th 05 09:24 PM
Read SourceData from Chart Fernando Excel Programming 3 August 9th 05 04:46 AM
How to use ADO to change Pivottable sourcedata query Chace Excel Programming 0 May 17th 05 06:44 PM
Change SourceData in Excel PivotTable via VBA CarlsonClan Excel Programming 1 April 9th 04 04:15 AM
Setting up a SourceData:= in VB Emmanuel[_2_] Excel Programming 1 January 22nd 04 08:15 PM


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