LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
CRL CRL is offline
external usenet poster
 
Posts: 1
Default Error updating pivot table source data

Hi,

I'm trying to write a VB 6 app that updates the source
range for a set of pivot tables. Specifically, I'm using
the following code:

Set xlOutputSheet = xlOutputWorkbook.Sheets("MySheet")
Set xlPivot = xlOutputSheet.PivotTables _
("MyPivotTable")
Set xlPivotCache = xlPivot.PivotCache
RangeString = "MyOtherSheet!R2C1:R" & _
(Table_Dimension) & "C10"
With xlPivotCache
.SourceData = RangeString
.Refresh
End With

For most of the pivot tables, this works. However,
occasionally, for a reason I can't deduce I get the
following error:

"Application-defined or object-defined error"
at ".SourceData = RangeString". I'm pretty certain the
RangeString is correct.

Any insight would be helpful.

Thanks,

Craig

 
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
Error "invalid data source reference" for pivot table Manny Excel Worksheet Functions 6 April 5th 23 02:58 PM
Pivot Table "Data source reference is not valid" error cause? Bill Neurohr Excel Discussion (Misc queries) 1 March 11th 09 10:16 PM
updating pivot tables using dynamic data source dab4211 Excel Discussion (Misc queries) 3 July 24th 06 09:30 PM
Pivot Table data source "data source contains no visible tables" Jane Excel Worksheet Functions 0 September 29th 05 08:28 PM
Field Source Error for Pivot Table JM Excel Worksheet Functions 1 July 29th 05 02:08 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"