I am trying to create a pivot table from a pivot table using a macro. The data in the source pivot may change from week to week.
Here is my code:
Selection.CurrentRegion.Select
ActiveSheet.PivotTableWizard SourceType:=xlDatabase, SourceData:=_
Selection.CurrentRegion, TableDestination:="Pivot on Assignments!R1C1",TableName:=_
"PivotTable3"
I receive the following error message:
Runtime error'1004':
PivotTableWizard method of worksheet class failed
Can anyone assist in helping me correct this error?
Here is my code:
Selection.CurrentRegion.Select
ActiveSheet.PivotTableWizard SourceType:=xlDatabase, SourceData:=_
Selection.CurrentRegion, TableDestination:="Pivot on Assignments!R1C1",TableName:=_
"PivotTable3"
I receive the following error message:
Runtime error'1004':
PivotTableWizard method of worksheet class failed
Can anyone assist in helping me correct this error?