Hi I am trying to set pivot chart range from already prepared pivot table (pivot table name is "Table3").
I have written a code for it but it is giving me error that "Unable to get the pivottables property of the worksheets class"
Below is the code.
Sub chart()
Dim pivotrange As range
Dim chart1 As chart
Set pivotrange = Worksheets("SUMMARY").PivotTables("Table3").TableRange1
End Sub
I have written a code for it but it is giving me error that "Unable to get the pivottables property of the worksheets class"
Below is the code.
Sub chart()
Dim pivotrange As range
Dim chart1 As chart
Set pivotrange = Worksheets("SUMMARY").PivotTables("Table3").TableRange1
End Sub