Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Error "invalid data source reference" for pivot table | Excel Worksheet Functions | |||
Pivot Table "Data source reference is not valid" error cause? | Excel Discussion (Misc queries) | |||
updating pivot tables using dynamic data source | Excel Discussion (Misc queries) | |||
Pivot Table data source "data source contains no visible tables" | Excel Worksheet Functions | |||
Field Source Error for Pivot Table | Excel Worksheet Functions |