Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Macro to create pivotchart problems
Put together a quick macro to assemble a pivotchart, nothing fancy just ran
through it recording and tried to run it on the same data afterwards, and have come upon this error: Run-time error '1004': Unable to get the PivotFields property of the pivottable class When I go to debug, the error is occurring at the asterisked line: Cells.Select ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatab ase, SourceData:= _ "'Check results'!C1:C5").CreatePivotTable TableDestination:="", TableName:= _ "PivotTable1", DefaultVersion:=xlPivotTableVersion10 ActiveSheet.PivotTableWizard TableDestination:=ActiveSheet.Cells(3, 1) ActiveSheet.Cells(3, 1).Select Charts.Add ActiveChart.Location Whe=xlLocationAsNewSheet * With ActiveChart.PivotLayout.PivotTable.PivotFields("TE ST_LOCATION") .Orientation = xlPageField .Position = 1 End With Is there a workaround? Something I've missed? Thanks, Ryan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro problems | Excel Discussion (Misc queries) | |||
Create a macro to create excel line graph with coloured pointers anddata lables | Charts and Charting in Excel | |||
Duplicating PivotChart / Changing PivotChart data range | Charts and Charting in Excel | |||
Macro problems | Excel Worksheet Functions | |||
Create a total field for a pivot table/pivotchart | Excel Discussion (Misc queries) |