I know I have seen this thread a few times but I don't seem to grasp the solution as each time it seems to be a little different.
I have recorded a macro so I could use it in an automated spreadsheet, the code I have is;
Cells.Select ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _ "'INFO'!C1:C3").CreatePivotTable TableDestination:="", _ TableName:="PivotTable1", DefaultVersion:=xlPivotTableVersion10 ActiveSheet.PivotTableWizard TableDestination:=ActiveSheet.Cells(3, 1) ActiveSheet.Cells(3, 1).Select Charts.Add ActiveChart.Location Where:=xlLocationAsNewSheet With ActiveChart.PivotLayout.PivotTable.PivotFields("Type") .Orientation = xlColumnField .Position = 1 End With With ActiveChart.PivotLayout.PivotTable.PivotFields("Date") .Orientation = xlRowField .Position = 1 End With ActiveChart.PivotLayout.PivotTable.AddDataField ActiveChart.PivotLayout. _ PivotTable.PivotFields("Orders"), "Count of Orders", xlCount ActiveChart.PivotLayout.PivotTable.PivotFields("Count of Orders").Function = _ xlSum
It fails with the error in the subject when it gets to the following line;
The spreadhseet is a simple one it has three columns, Date, order (Sum) and Type headings.
Any help please , am using windows 2000 with excel 2002.
Microsoft is conducting an online survey to understand your opinion of the Msdn Web site. If you choose to participate, the online survey will be presented to you when you leave the Msdn Web site.
Would you like to participate?