• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

trying to change pivot data source but error to save

prashant.kvs007

New Member
Sub ChangeDataSource()

With ActiveSheet.Shapes(Application.Caller).ControlFormat
ActiveSheet.PivotTables("PivotTable2").PivotTableWizard SourceType:=xlDatabase, SourceData:= _
.List(.Value)
ActiveSheet.PivotTables("PivotTable3").PivotTableWizard SourceType:=xlDatabase, SourceData:= _
.List(.Value)
ActiveSheet.PivotTables("PivotTable4").PivotTableWizard SourceType:=xlDatabase, SourceData:= _
.List(.Value)
ActiveSheet.PivotTables("PivotTable5").PivotTableWizard SourceType:=xlDatabase, SourceData:= _
.List(.Value)
ActiveSheet.PivotTables("PivotTable6").PivotTableWizard SourceType:=xlDatabase, SourceData:= _
.List(.Value)
ActiveSheet.PivotTables("PivotTable7").PivotTableWizard SourceType:=xlDatabase, SourceData:= _
.List(.Value)
ActiveSheet.PivotTables("PivotTable8").PivotTableWizard SourceType:=xlDatabase, SourceData:= _
.List(.Value)
ActiveSheet.PivotTables("PivotTable9").PivotTableWizard SourceType:=xlDatabase, SourceData:= _
.List(.Value)
ActiveSheet.PivotTables("PivotTable10").PivotTableWizard SourceType:=xlDatabase, SourceData:= _
.List(.Value)
ActiveSheet.PivotTables("PivotTable11").PivotTableWizard SourceType:=xlDatabase, SourceData:= _
.List(.Value)
ActiveSheet.PivotTables("PivotTable12").PivotTableWizard SourceType:=xlDatabase, SourceData:= _
.List(.Value)

End With

End Sub
 
Hi ,

When ever there is an error in code , please mention two things :

1. The line which generates the error

2. The description of the error.

If possible , upload the file with the code and the data in it.

Narayan
 
Back
Top