M
M Carman
What is the correct way to update the data source for a pivot table? All I've
come up with is the following, but the new data range does not apply when the
code runs. Is there a way to update the range directly wthout using the
PivotTableWizard method? Is there a way to use "A1" referencing instead of
"R1C1"?
dim X as integer
Sheets("ws1").PivotTableWizard SourceType:=xlDatabase, _
SourceData:="ws2!R1C1:R" & X & "C15"
come up with is the following, but the new data range does not apply when the
code runs. Is there a way to update the range directly wthout using the
PivotTableWizard method? Is there a way to use "A1" referencing instead of
"R1C1"?
dim X as integer
Sheets("ws1").PivotTableWizard SourceType:=xlDatabase, _
SourceData:="ws2!R1C1:R" & X & "C15"